From c8799dfeb664a400b4c150166174265ec2015f98 Mon Sep 17 00:00:00 2001 From: Nabil Ghodbane Date: Tue, 19 Mar 2024 16:15:45 +0100 Subject: [PATCH] [bos #41189][Windows] consider debug build --- applications/SALOME-master-windows.pyconf | 8 ++-- products/Cython.pyconf | 25 ++++++++++++ products/compil_scripts/cython-0.29.37.bat | 4 +- products/compil_scripts/psutil-5.9.8.bat | 46 ++++++++++++++++++++++ products/numpy.pyconf | 24 +++++++++++ products/psutil.pyconf | 9 +++++ 6 files changed, 110 insertions(+), 6 deletions(-) create mode 100644 products/compil_scripts/psutil-5.9.8.bat diff --git a/applications/SALOME-master-windows.pyconf b/applications/SALOME-master-windows.pyconf index 5c8fc7a..69476ed 100644 --- a/applications/SALOME-master-windows.pyconf +++ b/applications/SALOME-master-windows.pyconf @@ -152,7 +152,7 @@ APPLICATION : 'KERNEL' : 'bos/41189' 'MEDCOUPLING' : 'master' 'GUI' : 'bos/41189' - 'GEOM' + 'GEOM' : 'bos/41189' 'SMESH' 'NETGENPLUGIN' 'BLSURFPLUGIN' : 'bos/41189' @@ -213,13 +213,13 @@ __overwrite__ : 'APPLICATION.rm_products' : ['matplotlib', 'openturns', 'scipy', 'Pillow', 'PERSALYS', 'OPENTURNS_SALOME', 'cminpack', 'openblas', 'FMILibrary', 'PyFMI', 'fftw', 'statsmodels'] # TODO: cmake 3.24 screws things up by adding _d suffix to debug libraries to KERNEL 'APPLICATION.products.cmake' : {tag: '3.12.1', base: 'no', section : 'version_3_12_1' } - 'APPLICATION.products.numpy' : {tag: '1.16.4', base: 'no', section : 'version_1_16_4_win_dbg' } - 'APPLICATION.products.Cython' : {tag: '0.29.12', base: 'no', section : 'version_0_29_12_win_dbg' } + 'APPLICATION.products.numpy' : {tag: '1.21.6', base: 'no', section : 'version_1_21_6_win_dbg' } + 'APPLICATION.products.Cython' : {tag: '0.29.37', base: 'no', section : 'version_0_29_37_win_dbg' } 'APPLICATION.products.sphinxintl' : {tag: '2.0.0', base: 'no', section : 'version_2_0_0_win_dbg' } 'APPLICATION.products.llvm' : {tag: '8.0.1', base: 'no', section : 'version_8_0_1_clang_win_dbg'} 'APPLICATION.products.tbb' : {tag: '2019_U8', base: 'no', section : 'version_2019_U8_win_dbg' } 'APPLICATION.products.omniORB' : {tag: '4.2.3', base: 'no', section : 'version_4_2_3_win_dbg' } - 'APPLICATION.products.psutil' : {tag: '5.7.2', base: 'no', section : 'version_5_7_2_win_dbg' } + 'APPLICATION.products.psutil' : {tag: '5.9.8', base: 'no', section : 'version_5_9_8_win_dbg' } 'APPLICATION.products.ParaView' : {tag: '5.11.0', base: 'no', section : 'version_5_11_0_win_dbg' } 'APPLICATION.products.zlib' : {tag: '1.2.5', base: 'no', section : 'version_1_2_5_win_dbg' } 'APPLICATION.products.gmsh' : {tag: '4.10.3', base: 'no', section : 'version_4_10_3_win_dbg' } diff --git a/products/Cython.pyconf b/products/Cython.pyconf index b972d7f..5cc2a48 100755 --- a/products/Cython.pyconf +++ b/products/Cython.pyconf @@ -37,6 +37,31 @@ version_0_29_37: archive_info : {archive_name : "Cython-0.29.37.tar.gz"} } +version_0_29_37_win_dbg : +{ + name : "Cython" + build_source : "script" + compil_script : 'cython.bat' + get_source : "archive" + archive_info: + { + archive_name : "Cython-0.29.37.tar.gz" + } + environ : + { + env_script : $name + ".py" + } + depend : ['Python', 'setuptools', 'sip'] # in debug mode + opt_depend: ['psutil'] + source_dir : $APPLICATION.workdir + $VARS.sep + 'SOURCES' + $VARS.sep + $name + build_dir : $APPLICATION.workdir + $VARS.sep + 'BUILD' + $VARS.sep + $name + properties: + { + incremental : "yes" + pip : "no" + } +} + version_0_29_12_win_dbg : { name : "Cython" diff --git a/products/compil_scripts/cython-0.29.37.bat b/products/compil_scripts/cython-0.29.37.bat index b1105ba..3dc3209 100644 --- a/products/compil_scripts/cython-0.29.37.bat +++ b/products/compil_scripts/cython-0.29.37.bat @@ -48,9 +48,9 @@ if NOT %ERRORLEVEL% == 0 ( REM In debug mode, we need to rename all .pyd to _d.pyd... don't ask why. Seems like a known bug in OmniORB. if %SAT_DEBUG% == 1 ( - cd %PYTHON_ROOT_DIR%\lib\site-packages\Cython-0.29.12-py3.6-win-amd64.egg + cd %PYTHON_ROOT_DIR%\lib\site-packages\Cython-0.29.37-py3.9-win-amd64.egg powershell -Command "Get-ChildItem -File -Recurse *.pyd| ForEach-Object {if ((!$_.Name.EndsWith('_d.pyd'))) { $_ | Copy-Item -Destination {$_.Name -replace '.pyd','_d.pyd'}}}" - cd %PYTHON_ROOT_DIR%lib\site-packages\Cython-0.29.12-py3.6-win-amd64.egg\Cython\Runtime + cd %PYTHON_ROOT_DIR%lib\site-packages\Cython-0.29.37-py3.9-win-amd64.egg\Cython\Runtime powershell -Command "Get-ChildItem -File -Recurse *.pyd| ForEach-Object {if ((!$_.Name.EndsWith('_d.pyd'))) { $_ | Copy-Item -Destination {$_.Name -replace '.pyd','_d.pyd'}}}" ) diff --git a/products/compil_scripts/psutil-5.9.8.bat b/products/compil_scripts/psutil-5.9.8.bat new file mode 100644 index 0000000..19ceb67 --- /dev/null +++ b/products/compil_scripts/psutil-5.9.8.bat @@ -0,0 +1,46 @@ +@echo off + +echo ########################################################################## +echo psutil %VERSION% +echo ########################################################################## + +REM install in python directly +SET INSTALL_CENTRALLY=1 + +IF NOT DEFINED SAT_DEBUG ( + SET SAT_DEBUG=0 +) + +set BUILD_OPT= +if %SAT_DEBUG% == 1 ( + set BUILD_OPT=--debug +) + +if NOT exist "%PRODUCT_INSTALL%" mkdir %PRODUCT_INSTALL% +REM clean BUILD directory +if exist "%BUILD_DIR%" rmdir /Q /S %BUILD_DIR% +mkdir %BUILD_DIR% +cd %SOURCE_DIR% +xcopy * %BUILD_DIR%\ /E /I /Q +cd %BUILD_DIR% +mkdir %PRODUCT_INSTALL%\Lib\site-packages +set PATH=%CWD%\bin;%PATH% +set PYTHONPATH=%PYTHONPATH%;%PRODUCT_INSTALL%\Lib\site-packages + +echo. +echo *** +if %INSTALL_CENTRALLY% == 1 ( + %PYTHONBIN% setup.py build %BUILD_OPT% install +) else ( + %PYTHONBIN% setup.py build %BUILD_OPT% install --prefix=%PRODUCT_INSTALL% +) +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on psutil running %PYTHONBIN% setup.py build %BUILD_OPT% install --prefix=%PRODUCT_INSTALL% + exit 1 +) +echo. +echo Product %PRODUCT_NAME% version: %VERSION%> %PRODUCT_INSTALL%\README.txt +echo Installation folder: %PYTHON_ROOT_DIR%>> %PRODUCT_INSTALL%\README.txt + +echo. +echo ########## END diff --git a/products/numpy.pyconf b/products/numpy.pyconf index 66bf12d..d8d9a08 100755 --- a/products/numpy.pyconf +++ b/products/numpy.pyconf @@ -48,6 +48,30 @@ version_1_22_2: patches: ['SPNS-29988-numpy-1.22.patch'] } +version_1_21_6_win_dbg: +{ + name : "numpy" + build_source : "script" + compil_script : $name + $VARS.scriptExtension + get_source : "archive" + archive_info: + { + archive_name : "numpy-1.21.6.tar.gz" + } + depend : [ 'Python', 'setuptools', 'Cython'] + environ : + { + env_script : $name + ".py" + } + source_dir : $APPLICATION.workdir + $VARS.sep + 'SOURCES' + $VARS.sep + $name + build_dir : $APPLICATION.workdir + $VARS.sep + 'BUILD' + $VARS.sep + $name + properties: + { + incremental : "yes" + pip : "no" + } +} + version_1_16_4_win_dbg: { name : "numpy" diff --git a/products/psutil.pyconf b/products/psutil.pyconf index 691640c..3fa843b 100755 --- a/products/psutil.pyconf +++ b/products/psutil.pyconf @@ -26,6 +26,15 @@ default : } } +version_5_9_8_win_dbg: +{ + compil_script: "psutil-5.9.8.bat" + properties: + { + incremental : "yes" + pip : "no" + } +} version_5_7_2_win_dbg: { -- 2.39.2