Skip to content

Commit 1eb92ef

Browse files
authored
fix source path in pip package (#1291)
1 parent fea36e3 commit 1eb92ef

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/pip/setup.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,20 @@ def fetch_oms(self):
7272
if (sysconfig.get_platform() == 'linux-x86_64'):
7373
response = requests.get('https://build.openmodelica.org/omsimulator/nightly/linux-amd64/OMSimulator-linux-amd64-@[email protected]')
7474
dllpath = "lib/x86_64-linux-gnu/libOMSimulator.so"
75+
sourcePath = "lib/x86_64-linux-gnu/OMSimulator"
7576
elif (sysconfig.get_platform() == "mingw_x86_64_ucrt" or (sysconfig.get_platform() == 'mingw' and platform.architecture()[0] == '64bit')):
7677
response = requests.get('https://build.openmodelica.org/omsimulator/nightly/win-mingw-ucrt64/OMSimulator-mingw-ucrt64-@[email protected]')
7778
dllpath = "bin/libOMSimulator.dll"
79+
sourcePath = "lib/OMSimulator"
7880
elif (sysconfig.get_platform() == 'win-amd64'):
7981
response = requests.get('https://build.openmodelica.org/omsimulator/nightly/win-msvc64/OMSimulator-win64-@[email protected]')
8082
dllpath = "bin/OMSimulator.dll"
83+
sourcePath = "lib/OMSimulator"
8184
elif (platform.system() == 'Darwin'):
8285
response = requests.get('https://build.openmodelica.org/omsimulator/nightly/osx/OMSimulator-osx-@[email protected]')
8386
dllpath = "lib/libOMSimulator.dylib"
87+
## the path needs to be checked, as of now we are not buiding artifacts for macos
88+
sourcePath = "lib/OMSimulator"
8489
else:
8590
raise Exception("Platform not supported for {} ".format(sysconfig.get_platform()))
8691

@@ -111,7 +116,7 @@ def fetch_oms(self):
111116
shutil.unpack_archive(zipFilePath, zipDir)
112117

113118
# copy OMSimulator package to root directory
114-
copy_tree(os.path.join(zipDir, 'lib/OMSimulator'), target_dir)
119+
copy_tree(os.path.join(zipDir, sourcePath), target_dir)
115120

116121
# copy schema path to OMSimulator/schema
117122
copy_tree(os.path.join(zipDir, 'share/OMSimulator/schema'), target_dir +"/schema")

0 commit comments

Comments
 (0)