Skip to content

Commit

Permalink
Update file separators in setup.py (#206)
Browse files Browse the repository at this point in the history
  • Loading branch information
modelonrobinandersson authored Oct 27, 2023
1 parent 20298f1 commit 955dec5
Showing 1 changed file with 26 additions and 13 deletions.
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

0 comments on commit 955dec5

Please sign in to comment.