Salome HOME
spns #29664: omniORB: fix python path
[tools/sat_salome.git] / products / compil_scripts / cython.bat
index 373249c2c510434085c45a52804b3b5d4b9370ce..97e738bf993e6db7e333c5f8224dcacf86100e07 100755 (executable)
@@ -39,13 +39,21 @@ echo --------------------------------------------------------------------------
 if %INSTALL_CENTRALLY% == 1 (\r
     %PYTHON_ROOT_DIR%\python.exe setup.py install \r
 ) else (\r
-    %PYTHON_ROOT_DIR%\python setup.py install  --single-version-externally-managed --root=/ --prefix=%PRODUCT_INSTALL% --install-lib=%PRODUCT_INSTALL%\lib\python%PYTHON_VERSION%\site-packages\r
+    %PYTHON_ROOT_DIR%\python.exe setup.py install  --single-version-externally-managed --root=/ --prefix=%PRODUCT_INSTALL% --install-lib=%PRODUCT_INSTALL%\lib\python%PYTHON_VERSION%\site-packages\r
 )\r
 if NOT %ERRORLEVEL% == 0  (\r
     echo "ERROR on setup install"\r
     exit 3\r
 )\r
 \r
+REM In debug mode, we need to rename all .pyd to _d.pyd... don't ask why. Seems like a known bug in OmniORB.\r
+if %SAT_DEBUG% == 1 (\r
+  cd %PYTHON_ROOT_DIR%\lib\site-packages\Cython-0.29.12-py3.6-win-amd64.egg\r
+  powershell -Command "Get-ChildItem -File -Recurse *.pyd| ForEach-Object {if ((!$_.Name.EndsWith('_d.pyd'))) {  $_ | Copy-Item -Destination {$_.Name  -replace '.pyd','_d.pyd'}}}"\r
+  cd %PYTHON_ROOT_DIR%lib\site-packages\Cython-0.29.12-py3.6-win-amd64.egg\Cython\Runtime\r
+  powershell -Command "Get-ChildItem -File -Recurse *.pyd| ForEach-Object {if ((!$_.Name.EndsWith('_d.pyd'))) {  $_ | Copy-Item -Destination {$_.Name  -replace '.pyd','_d.pyd'}}}"\r
+)\r
+\r
 echo.\r
 echo Product %PRODUCT_NAME% version: %VERSION%> %PRODUCT_INSTALL%\README.txt\r
 echo Installation folder: %PYTHON_ROOT_DIR%>> %PRODUCT_INSTALL%\README.txt\r