diff --git a/src/pip/setup.py b/src/pip/setup.py index 0aace3d2e..e9f56ae0e 100644 --- a/src/pip/setup.py +++ b/src/pip/setup.py @@ -72,15 +72,20 @@ def fetch_oms(self): if (sysconfig.get_platform() == 'linux-x86_64'): response = requests.get('https://build.openmodelica.org/omsimulator/nightly/linux-amd64/OMSimulator-linux-amd64-@OMS_VERSION_STRING@.tar.gz') dllpath = "lib/x86_64-linux-gnu/libOMSimulator.so" + sourcePath = "lib/x86_64-linux-gnu/OMSimulator" elif (sysconfig.get_platform() == "mingw_x86_64_ucrt" or (sysconfig.get_platform() == 'mingw' and platform.architecture()[0] == '64bit')): response = requests.get('https://build.openmodelica.org/omsimulator/nightly/win-mingw-ucrt64/OMSimulator-mingw-ucrt64-@OMS_VERSION_STRING@.zip') dllpath = "bin/libOMSimulator.dll" + sourcePath = "lib/OMSimulator" elif (sysconfig.get_platform() == 'win-amd64'): response = requests.get('https://build.openmodelica.org/omsimulator/nightly/win-msvc64/OMSimulator-win64-@OMS_VERSION_STRING@.zip') dllpath = "bin/OMSimulator.dll" + sourcePath = "lib/OMSimulator" elif (platform.system() == 'Darwin'): response = requests.get('https://build.openmodelica.org/omsimulator/nightly/osx/OMSimulator-osx-@OMS_VERSION_STRING@.zip') dllpath = "lib/libOMSimulator.dylib" + ## the path needs to be checked, as of now we are not buiding artifacts for macos + sourcePath = "lib/OMSimulator" else: raise Exception("Platform not supported for {} ".format(sysconfig.get_platform())) @@ -111,7 +116,7 @@ def fetch_oms(self): shutil.unpack_archive(zipFilePath, zipDir) # copy OMSimulator package to root directory - copy_tree(os.path.join(zipDir, 'lib/OMSimulator'), target_dir) + copy_tree(os.path.join(zipDir, sourcePath), target_dir) # copy schema path to OMSimulator/schema copy_tree(os.path.join(zipDir, 'share/OMSimulator/schema'), target_dir +"/schema")