3 echo ##########################################################################
\r
4 echo Cython %VERSION%
\r
5 echo ##########################################################################
\r
7 REM install in python directly
\r
8 SET INSTALL_CENTRALLY=1
\r
10 IF NOT DEFINED SAT_DEBUG (
\r
14 if NOT exist "%PRODUCT_INSTALL%" mkdir %PRODUCT_INSTALL%
\r
16 REM clean BUILD directory
\r
17 if exist "%BUILD_DIR%" rmdir /Q /S %BUILD_DIR%
\r
23 echo --------------------------------------------------------------------------
\r
24 echo *** Launching "python.exe setup.py build"
\r
25 echo --------------------------------------------------------------------------
\r
27 REM not built by OCCT - see spns #20292 attached Excel document
\r
28 REM if %SAT_DEBUG% == 1 (
\r
29 REM set BUILD_OPT=--debug
\r
32 %PYTHON_ROOT_DIR%\python.exe setup.py build %BUILD_OPT%
\r
36 echo --------------------------------------------------------------------------
\r
37 echo *** Launching "python.exe setup.py install"
\r
38 echo --------------------------------------------------------------------------
\r
39 if %INSTALL_CENTRALLY% == 1 (
\r
40 %PYTHON_ROOT_DIR%\python.exe setup.py install
\r
42 %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
44 if NOT %ERRORLEVEL% == 0 (
\r
45 echo "ERROR on setup install"
\r
49 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
50 if %SAT_DEBUG% == 1 (
\r
51 cd %PYTHON_ROOT_DIR%\lib\site-packages\Cython-0.29.12-py3.6-win-amd64.egg
\r
52 powershell -Command "Get-ChildItem -File -Recurse *.pyd| ForEach-Object {if ((!$_.Name.EndsWith('_d.pyd'))) { $_ | Copy-Item -Destination {$_.Name -replace '.pyd','_d.pyd'}}}"
\r
53 cd %PYTHON_ROOT_DIR%lib\site-packages\Cython-0.29.12-py3.6-win-amd64.egg\Cython\Runtime
\r
54 powershell -Command "Get-ChildItem -File -Recurse *.pyd| ForEach-Object {if ((!$_.Name.EndsWith('_d.pyd'))) { $_ | Copy-Item -Destination {$_.Name -replace '.pyd','_d.pyd'}}}"
\r
58 echo Product %PRODUCT_NAME% version: %VERSION%> %PRODUCT_INSTALL%\README.txt
\r
59 echo Installation folder: %PYTHON_ROOT_DIR%>> %PRODUCT_INSTALL%\README.txt
\r