From ca95eee457e1084b4a3738bf6db1e5056d875835 Mon Sep 17 00:00:00 2001 From: Robin Andersson Date: Thu, 26 Oct 2023 14:59:15 -0400 Subject: [PATCH 1/2] Update setup.py package_data --- setup.py | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/setup.py b/setup.py index 97091b5f..20adb337 100644 --- a/setup.py +++ b/setup.py @@ -311,19 +311,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 ) From c06e1d4182a992ef0efcd0f607c2f657cb46e0bf Mon Sep 17 00:00:00 2001 From: Robin Andersson Date: Thu, 26 Oct 2023 15:06:09 -0400 Subject: [PATCH 2/2] Added missing new variable --- setup.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setup.py b/setup.py index 20adb337..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,