Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update setup.py package_data #206

Merged
merged 2 commits into from
Oct 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 26 additions & 13 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
)

Expand Down