Salome HOME
rely on non empty %SALOME_APPLICATION_NAME% to target URANIE
[tools/sat_salome.git] / products / compil_scripts / cython.bat
index 3715a7bdc59405f0d4d1b9ad790b24e5f0581afd..97e738bf993e6db7e333c5f8224dcacf86100e07 100755 (executable)
@@ -24,9 +24,10 @@ echo --------------------------------------------------------------------------
 echo *** Launching "python.exe setup.py build"\r
 echo --------------------------------------------------------------------------\r
 set BUILD_OPT=\r
-if %SAT_DEBUG% == 1 (\r
-   set BUILD_OPT=--debug\r
-)\r
+REM not built by OCCT - see spns #20292 attached Excel document\r
+REM if %SAT_DEBUG% == 1 (\r
+REM    set BUILD_OPT=--debug\r
+REM)\r
 \r
 %PYTHON_ROOT_DIR%\python.exe setup.py build %BUILD_OPT%\r
 \r
@@ -38,16 +39,24 @@ 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
 \r
 echo.\r
-echo ########## END
\ No newline at end of file
+echo ########## END\r