diff --git a/setup.py b/setup.py index 97091b5f..7e0e7483 100644 --- a/setup.py +++ b/setup.py @@ -294,6 +294,8 @@ def check_extensions(): shutil.copy2('CHANGELOG', os.path.join('src', 'pyfmi', 'CHANGELOG')) except Exception: pass +extra_package_data = ['*fmilib_shared*'] if sys.platform.startswith("win") else [] +extra_package_data += ['libgcc_s_dw2-1.dll'] if copy_gcc_lib else [] from numpy.distutils.core import setup setup(name=NAME, @@ -311,19 +313,30 @@ def check_extensions(): package_dir = {'pyfmi': os.path.join('src', 'pyfmi'), 'pyfmi.common': os.path.join('src', 'common'), 'pyfmi.tests': 'tests'}, - packages=['pyfmi','pyfmi.simulation','pyfmi.examples','pyfmi.common','pyfmi.common.plotting', 'pyfmi.tests', 'pyfmi.common.log'], - package_data = {'pyfmi':[os.path.join('examples', 'files', 'FMUs', 'ME1.0', '*'), - os.path.join('examples', 'files', 'FMUs', 'CS1.0', '*'), - os.path.join('examples', 'files', 'FMUs', 'ME2.0', '*'), - os.path.join('examples', 'files', 'FMUs', 'CS2.0', '*'), - os.path.join('tests', 'files', 'FMUs', 'XML', 'ME1.0', '*'), - os.path.join('tests', 'files', 'FMUs', 'XML', 'CS1.0', '*'), - os.path.join('tests', 'files', 'FMUs', 'XML', 'ME2.0', '*'), - os.path.join('tests', 'files', 'FMUs', 'XML', 'CS2.0', '*'), - os.path.join('tests', 'files', 'Results', '*'), - os.path.join('tests', 'files', 'Logs', '*'), - 'version.txt', 'LICENSE', 'CHANGELOG', - os.path.join('util', '*')]+(['*fmilib_shared*'] if sys.platform.startswith("win") else [])+(['libgcc_s_dw2-1.dll'] if copy_gcc_lib else [])}, + packages=[ + 'pyfmi', + 'pyfmi.simulation', + 'pyfmi.examples', + 'pyfmi.common', + 'pyfmi.common.plotting', + 'pyfmi.tests', + 'pyfmi.common.log' + ], + package_data = {'pyfmi': [ + 'examples/files/FMUs/ME1.0/*', + 'examples/files/FMUs/CS1.0/*', + 'examples/files/FMUs/ME2.0/*', + 'examples/files/FMUs/CS2.0/*', + 'tests/files/FMUs/XML/ME1.0/*', + 'tests/files/FMUs/XML/CS1.0/*', + 'tests/files/FMUs/XML/ME2.0/*', + 'tests/files/FMUs/XML/CS2.0/*', + 'tests/files/Results/*', + 'tests/files/Logs/*', + 'version.txt', + 'LICENSE', + 'CHANGELOG', + 'util/*'] + extra_package_data}, script_args=copy_args )