Metadata-Version: 2.4
Name: PyFMI
Version: 2.20.1
Summary: A package for working with dynamic models compliant with the Functional Mock-Up Interface standard.
Home-page: https://github.com/modelon-community/PyFMI
Download-URL: https://github.com/modelon-community/PyFMI/releases
Author: Modelon AB
Author-email: 
License: LGPL
Platform: Linux
Platform: Windows
Platform: MacOS X
Classifier: Programming Language :: Python
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: Unix
License-File: LICENSE
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: download-url
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: platform
Dynamic: summary


PyFMI is a package for loading and interacting with Functional Mock-Up
Units (FMUs), which are compiled dynamic models compliant with the
Functional Mock-Up Interface (FMI), see
https://www.fmi-standard.org/ for more information. PyFMI
is based on FMI Library, see https://github.com/modelon-community/fmi-library .

FMI is a standard that enables tool independent exchange of dynamic
models on binary format. Several industrial simulation platforms
supports export of FMUs, including, Impact, Dymola, OpenModelica
and SimulationX, see https://www.fmi-standard.org/tools
for a complete list. PyFMI offers a Python interface for interacting
with FMUs and enables for example loading of FMU models, setting of
model parameters and evaluation of model equations.

Using PyFMI together with the Python
simulation package `Assimulo <http://pypi.python.org/pypi/Assimulo>`_
adds industrial grade simulation capabilities of FMUs to Python.

Requirements:
-------------
- `FMI Library (at least 2.0.1) <https://github.com/modelon-community/fmi-library>`_
- `Python-headers (usually included on Windows, python-dev on Ubuntu)`_
- `Python 3.11 or newer`_
- Python package dependencies are listed in file setup.cfg.

Optional
---------
- `wxPython <http://pypi.python.org/pypi/wxPython>`_ For the Plot GUI.
- `matplotlib <http://pypi.python.org/pypi/matplotlib>`_ For the Plot GUI.

Source Installation (note that assimulo needs to be installed and on PYTHONPATH in order to install pyfmi):
----------------------

python setup.py install --fmil-home=/path/to/FMI_Library/


Dynamic FMI Library Handling in PyFMI Build Process
===================================================

PyFMI depends on the FMI Library (FMIL) for core functionality. Users can choose
between static or dynamic linking via the --fmil-name build argument (default: 'fmilib_shared').

When building with dynamic FMIL, the behavior varies by platform and build type:

Platform-Specific Dynamic Library Handling:
-------------------------------------------

**Windows Builds:**
- Dynamic FMIL library (.dll) is automatically copied into the PyFMI package directory
- Creates a self-contained installation with no external library dependencies
- End users don't need separate FMIL installation or PATH configuration

**Linux Standard Installation:**
- PyFMI extensions are linked with RPATH pointing to original FMIL location
- Dynamic library remains in its system installation directory
- Requires FMIL to remain accessible at the configured path during runtime
- Suitable for system-wide installations with centralized FMIL management
- Smaller PyFMI package size due to external library reference

**Linux Wheel Builds:**
- Dynamic FMIL library is copied into the PyFMI package (similar to Windows)
- RPATH set to '$ORIGIN' for relative library loading
- Creates portable, self-contained wheels for distribution
- No external FMIL dependency required at runtime

**Static Library Alternative:**
- When using static FMIL (--fmil-name without 'shared' suffix):
- Library code is embedded directly into PyFMI extensions
- Larger package size but completely self-contained
- No runtime library dependencies

Build Process Flow:
------------------
1. Locate FMIL library in specified directories (lib/, lib64/, bin/)
2. For dynamic libraries on Windows or wheel builds: copy to package directory
3. Configure appropriate RPATH settings for Linux installations
4. Build Cython extensions with proper library linking
5. Clean up temporary library copies after successful build

This approach ensures PyFMI works correctly across different deployment scenarios
while optimizing for each platform's conventions and user expectations.
