From: Nabil Ghodbane Date: Fri, 12 Apr 2024 14:05:12 +0000 (+0200) Subject: bos #41189 - support embedded Python 3.9 - Windows X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=56c58e89a80eb018b923a0cdc914cf7ec50ee6c7;p=tools%2Fsat_salome.git bos #41189 - support embedded Python 3.9 - Windows --- diff --git a/applications/SALOME-master-windows.pyconf b/applications/SALOME-master-windows.pyconf index d996341..cc619ad 100644 --- a/applications/SALOME-master-windows.pyconf +++ b/applications/SALOME-master-windows.pyconf @@ -12,6 +12,7 @@ APPLICATION : debug : 'no' base : 'no' python3 : 'yes' + pyver : '3.9' environ : { build : @@ -29,6 +30,7 @@ APPLICATION : SALOME_MODULES_ORDER:"SHAPER:SHAPERSTUDY:GEOM:SMESH", SALOME_ON_DEMAND: "HIDE" } + SALOME_APPLICATION_NAME : $APPLICATION.name SALOME_trace : "local" # local/file:.../with_logger SALOME_MODULES : "SHAPER,SHAPERSTUDY,GEOM,SMESH,PARAVIS,YACS,JOBMANAGER" # specify the first modules to display in gui SALOME_TMP_DIR : "%appdata%" @@ -37,7 +39,7 @@ APPLICATION : products : { # PREREQUISITES : - alabaster : '0.7.6' + alabaster : '0.7.16' Babel : '2.7.0' boost : '1.67.0' CAS : {tag : 'V7_5_3p5', section: 'version_CR753_SALOME_PATCH_win', base: 'no'} @@ -50,8 +52,8 @@ APPLICATION : colorama: '0.4.1' cppunit : '1.13.2' cycler : '0.10.0' - Cython : '0.29.12' - dateutil : '2.8.0' + Cython : '0.29.37' + dateutil : '2.8.2' dill : '0.3.4' docutils : '0.14' doxygen : '1.8.3.1' @@ -70,14 +72,14 @@ APPLICATION : imagesize : '1.1.0' ispc : '1.15.0' Jinja2 : '2.10.1' - kiwisolver : '1.1.0' + kiwisolver : '1.4.5' lapack : '3.8.0' libjpeg: '9c' libpng: '1.5.10' libxml2 : '2.9.1' llvm : '8.0.1-clang-win' markupsafe : '1.1.1' - matplotlib : '3.1.0' + matplotlib : '3.3.4' medfile : '4.1.1' mesa : '19.2.3' MeshGems : '2.15-1' @@ -87,7 +89,7 @@ APPLICATION : # comment out line above and uncomment the line below to use Netgen 6. #netgen : '6.2.2101' nlopt : '2.5.0' - numpy : '1.16.4' + numpy : '1.21.6' omniORB : '4.2.3' omniORBpy : '4.2.3' openblas : '0.3.23' @@ -96,33 +98,34 @@ APPLICATION : openturns: '1.21' ospray : '2.4.0' packaging : '19.0' - pandas : '0.25.2' + pandas : '1.5.3' patsy : '0.5.2' ParaView : {tag:'5.11.0', base: 'no', section: 'version_5_11_0'} PERSALYS: 'v14.1' perl : '5.28.1.1' - Pillow : '7.1.1' + Pillow : '10.2.0' planegcs : '0.18-3cb6890' - psutil : '5.7.2' + psutil : '5.9.8' pthreads : '2.9.1' PyFMI : '2.6' Pygments : '2.4.2' pyparsing : '2.4.0' PyQt : '5.15.3' - pyreadline : '2.1' - Python : '3.6.5' - pytz : '2019.1' + pyreadline : '3.4.1' + Python : '3.9.14' + pytz : '2020.1' qt : '5.12.10' qwt : '6.1.2' requests : '2.22.0' rkCommon : '1.5.1' ruby : '2.5.5-1' - scipy : '1.4.1' - setuptools : '41.0.1' + #scikit_learn: '1.3.2' + scipy : '1.6.2' + setuptools : '69.0.3' sip : '5.5.0' six : '1.12.0' - snowballstemmer : '1.9.0' - Sphinx : '2.1.2' + snowballstemmer : '2.2.0' + Sphinx : '3.5.4' sphinxcontrib_applehelp : '1.0.1' sphinxcontrib_devhelp : '1.0.1' sphinxcontrib_jsmath : '1.0.1' @@ -132,7 +135,7 @@ APPLICATION : sphinxcontrib_websupport : '1.1.2' sphinx_rtd_theme : '0.4.3' sphinxintl: '2.0.0' - statsmodels: '0.9.0' + statsmodels: '0.12.2' swig : '4.0.2' tbb : '2019_U8_win' toml : '0.10.2' @@ -141,7 +144,7 @@ APPLICATION : zlib : '1.2.5' # SALOME MODULES : - 'CONFIGURATION' + 'CONFIGURATION' : 'bos/41189' 'SALOME' 'SHAPER' 'SHAPERSTUDY' @@ -149,11 +152,11 @@ APPLICATION : 'LIBBATCH' : {tag :'V2_5_0'} 'KERNEL' 'MEDCOUPLING' : 'master' - 'GUI' - 'GEOM' + 'GUI' : 'bos/41189' + 'GEOM' : 'bos/41189' 'SMESH' 'NETGENPLUGIN' - 'BLSURFPLUGIN' + 'BLSURFPLUGIN' : 'bos/41189' 'GHS3DPLUGIN' 'HYBRIDPLUGIN' 'HexoticPLUGIN' @@ -207,9 +210,62 @@ APPLICATION : __overwrite__ : [ { - __condition__ : "APPLICATION.debug == 'yes'" + __condition__ : "APPLICATION.pyver == '3.6' and APPLICATION.debug == 'no'" + 'APPLICATION.products.alabaster' : '0.7.6' + 'APPLICATION.products.Cython' : '0.29.12' + 'APPLICATION.products.dateutil' : '2.8.0' + 'APPLICATION.products.kiwisolver' : '1.1.0' + 'APPLICATION.products.matplotlib' : '3.1.0' + 'APPLICATION.products.numpy' : '1.16.4' + 'APPLICATION.products.pandas' : '0.25.2' + 'APPLICATION.products.Pillow' : '7.1.1' + 'APPLICATION.products.psutil' : '5.7.2' + 'APPLICATION.products.pyreadline' : '2.1' + 'APPLICATION.products.Python' : '3.6.5' + 'APPLICATION.products.pytz' : '2019.1' + 'APPLICATION.products.scipy' : '1.4.1' + 'APPLICATION.products.setuptools' : '41.0.1' + 'APPLICATION.products.snowballstemmer' : '1.9.0' + 'APPLICATION.products.Sphinx' : '2.1.2' + 'APPLICATION.products.statsmodels' : '0.9.0' + 'APPLICATION.products.GUI' : 'master' + 'APPLICATION.products.GEOM' : 'master' + 'APPLICATION.products.BLSURFPLUGIN' : 'master' + } + { + __condition__ : "APPLICATION.debug == 'yes' and APPLICATION.pyver == '3.9'" + 'APPLICATION.rm_products' : ['matplotlib', 'openturns', 'scipy', 'Pillow', 'PERSALYS', 'OPENTURNS_SALOME', 'cminpack', 'openblas', 'FMILibrary', 'PyFMI', 'fftw', 'statsmodels', 'YDEFX'] + # 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.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.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' } + } + { + __condition__ : "APPLICATION.debug == 'yes' and APPLICATION.pyver == '3.6'" 'APPLICATION.rm_products' : ['matplotlib', 'openturns', 'scipy', 'Pillow', 'PERSALYS', 'OPENTURNS_SALOME', 'cminpack', 'openblas', 'FMILibrary', 'PyFMI', 'fftw', 'statsmodel'] # TODO: cmake 3.24 screws things up by adding _d suffix to debug libraries to KERNEL + 'APPLICATION.products.alabaster' : '0.7.6' + 'APPLICATION.products.dateutil' : '2.8.0' + 'APPLICATION.products.kiwisolver' : '1.1.0' + 'APPLICATION.products.pandas' : '0.25.2' + 'APPLICATION.products.psutil' : '5.7.2' + 'APPLICATION.products.pyreadline' : '2.1' + 'APPLICATION.products.Python' : '3.6.5' + 'APPLICATION.products.pytz' : '2019.1' + 'APPLICATION.products.setuptools' : '41.0.1' + 'APPLICATION.products.snowballstemmer' : '1.9.0' + 'APPLICATION.products.Sphinx' : '2.1.2' + 'APPLICATION.products.GUI' : 'master' + 'APPLICATION.products.GEOM' : 'master' + 'APPLICATION.products.BLSURFPLUGIN' : 'master' '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' } diff --git a/products/Cython.pyconf b/products/Cython.pyconf index f2aead4..9c25d8d 100755 --- a/products/Cython.pyconf +++ b/products/Cython.pyconf @@ -32,11 +32,41 @@ default_win : archive_info : {archive_name : "Cython-" + $APPLICATION.products.Cython + "_windows.tar.gz"} } +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-0.29.37.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" build_source : "script" - compil_script : 'cython.bat' + compil_script : 'cython-0.29.12.bat' get_source : "archive" archive_info: { diff --git a/products/PyFMI.pyconf b/products/PyFMI.pyconf index c22857a..e32fa4e 100644 --- a/products/PyFMI.pyconf +++ b/products/PyFMI.pyconf @@ -43,6 +43,7 @@ version_2_6 : version_2_6_win : { + patches: ["PyFMI-2.6-importlogger.patch"] compil_script : "PyFMI-2.6.bat" properties: { diff --git a/products/Python.pyconf b/products/Python.pyconf index 6391bc4..5dba14d 100755 --- a/products/Python.pyconf +++ b/products/Python.pyconf @@ -144,7 +144,11 @@ version_3_9_14 : version_3_9_14_win : { compil_script : "Python-3.9.bat" - patches : [] + patches : ['python-3.9.14.01-ctype-init.patch', + 'python-3.9.14.02-os.py.patch', + 'python-3.9.14.03-getpath.patch', + 'python-3.9.14.04-dynload_win.patch' + ] build_depend : ['perl'] } diff --git a/products/compil_scripts/CAS_7.5.bat b/products/compil_scripts/CAS_7.5.bat index c5d8f14..879ea1d 100644 --- a/products/compil_scripts/CAS_7.5.bat +++ b/products/compil_scripts/CAS_7.5.bat @@ -100,7 +100,7 @@ taskkill /F /IM "mspdbsrv.exe" if %SAT_DEBUG% == 1 ( xcopy %PRODUCT_INSTALL%\win64\vc14\bind %PRODUCT_INSTALL%\win64\vc14\bin /E /I /Q - xcopy %PRODUCT_INSTALL%\win64\vc14\lib %PRODUCT_INSTALL%\win64\vc14\lib /E /I /Q + xcopy %PRODUCT_INSTALL%\win64\vc14\libd %PRODUCT_INSTALL%\win64\vc14\lib /E /I /Q ) echo. diff --git a/products/compil_scripts/Python-3.9.bat b/products/compil_scripts/Python-3.9.bat new file mode 100644 index 0000000..1bab858 --- /dev/null +++ b/products/compil_scripts/Python-3.9.bat @@ -0,0 +1,230 @@ +@echo off + +echo ########################################################################## +echo Python %VERSION% +echo ########################################################################## + +IF NOT DEFINED SAT_DEBUG ( + SET SAT_DEBUG=0 +) + +SET PRODUCT_BUILD_TYPE=Release +if %SAT_DEBUG% == 1 ( + set PRODUCT_BUILD_TYPE=Debug +) + +set PLATFORM_TARGET=x64 +if "%SALOME_APPLICATION_NAME%" == "URANIE" ( + set PLATFORM_TARGET=Win32 +) + +SET LIB_TAG= +if %SAT_DEBUG% == 1 ( + set LIB_TAG=_d +) + +if NOT exist "%PRODUCT_INSTALL%" mkdir %PRODUCT_INSTALL% +if NOT exist "%PRODUCT_INSTALL%\libs" mkdir %PRODUCT_INSTALL%\libs +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 +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on xcopy + exit 1 +) + +SET MSBUILDDISABLENODEREUSE=1 + +cd %BUILD_DIR%\PCbuild + +REM Upgrade to current version of MSVC +echo. +echo *** devenv pcbuild.sln /upgrade +devenv pcbuild.sln /upgrade +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on devenv + exit 1 +) + +echo. + +cd PCBuild + +echo. +echo Extracting bzip2... +if exist "%BUILD_DIR%\externals\cpython-source-deps-bzip2-1.0.8" rmdir /Q /S "%BUILD_DIR%\externals\cpython-source-deps-bzip2-1.0.8" +if exist "%BUILD_DIR%\externals\bzip2-1.0.8" rmdir /Q /S "%BUILD_DIR%\externals\bzip2-1.0.8" +7z x -y %BUILD_DIR%\externals\zips\bzip2-1.0.8.zip -o%BUILD_DIR%\externals +mv %BUILD_DIR%\externals\cpython-source-deps-bzip2-1.0.8 %BUILD_DIR%\externals\bzip2-1.0.8 + +echo. +echo Extracting ffi... +if exist "%BUILD_DIR%\externals\cpython-bin-deps-libffi-3.3.0" rmdir /Q /S "%BUILD_DIR%\externals\cpython-bin-deps-libffi-3.3.0" +7z x -y %BUILD_DIR%\externals\zips\libffi-3.3.0.zip -o%BUILD_DIR%\externals +mv %BUILD_DIR%\externals\cpython-bin-deps-libffi-3.3.0 %BUILD_DIR%\externals\libffi-3.3.0 + +echo. +echo Extracting nasm... +if exist "%BUILD_DIR%\externals\cpython-bin-deps-nasm-2.11.06" rmdir /Q /S "%BUILD_DIR%\externals\cpython-bin-deps-nasm-2.11.06" +if exist "%BUILD_DIR%\externals\nasm-2.11.06" rmdir /Q /S "%BUILD_DIR%\externals\nasm-2.11.06" +7z x -y %BUILD_DIR%\externals\zips\nasm-2.11.06.zip -o%BUILD_DIR%\externals +mv %BUILD_DIR%\externals\cpython-bin-deps-nasm-2.11.06 %BUILD_DIR%\externals\nasm-2.11.06 + +echo. +echo Extracting openssl... +if exist "%BUILD_DIR%\externals\cpython-source-deps-openssl-1.1.1n" rmdir /Q /S "%BUILD_DIR%\externals\cpython-source-deps-openssl-1.1.1n" +if exist "%BUILD_DIR%\externals\openssl-1.1.1n" rmdir /Q /S "%BUILD_DIR%\externals\openssl-1.1.1n" +7z x -y %BUILD_DIR%\externals\zips\openssl-1.1.1n.zip -o%BUILD_DIR%\externals +mv %BUILD_DIR%\externals\cpython-source-deps-openssl-1.1.1n %BUILD_DIR%\externals\openssl-1.1.1n + +if exist "%BUILD_DIR%\externals\cpython-bin-deps-openssl-bin-1.1.1n" rmdir /Q /S "%BUILD_DIR%\externals\cpython-bin-deps-openssl-bin-1.1.1n" +if exist "%BUILD_DIR%\externals\openssl-bin-1.1.1n" rmdir /Q /S "%BUILD_DIR%\externals\openssl-bin-1.1.1n" +7z x -y %BUILD_DIR%\externals\zips\openssl-bin-1.1.1n.zip -o%BUILD_DIR%\externals +mv %BUILD_DIR%\externals\cpython-bin-deps-openssl-bin-1.1.1n %BUILD_DIR%\externals\openssl-bin-1.1.1n + +echo. +echo Extracting sqlite... +if exist "%BUILD_DIR%\externals\cpython-source-deps-sqlite-3.37.2.0" rmdir /Q /S "%BUILD_DIR%\externals\cpython-source-deps-sqlite-3.37.2.0" +if exist "%BUILD_DIR%\externals\sqlite-3.37.2.0" rmdir /Q /S "%BUILD_DIR%\externals\sqlite-3.37.2.0" +7z x -y %BUILD_DIR%\externals\zips\sqlite-3.37.2.0.zip -o%BUILD_DIR%\externals +mv %BUILD_DIR%\externals\cpython-source-deps-sqlite-3.37.2.0 %BUILD_DIR%\externals\sqlite-3.37.2.0 + +echo. +echo Extracting tkinter/tcl +if exist "%BUILD_DIR%\externals\cpython-source-deps-tcl-core-8.6.12.0" rmdir /Q /S "%BUILD_DIR%\externals\cpython-source-deps-tcl-core-8.6.12.0" +if exist "%BUILD_DIR%\externals\tcl-core-8.6.12.0" rmdir /Q /S "%BUILD_DIR%\externals\tcl-core-8.6.12.0" +7z x -y %BUILD_DIR%\externals\zips\tcl-core-8.6.12.0.zip -o%BUILD_DIR%\externals +mv %BUILD_DIR%\externals\cpython-source-deps-tcl-core-8.6.12.0 %BUILD_DIR%\externals\tcl-core-8.6.12.0 + +echo. +echo Extracting tkinter/tcltk +if exist "%BUILD_DIR%\externals\cpython-bin-deps-tcltk-8.6.12.0" rmdir /Q /S "%BUILD_DIR%\externals\cpython-bin-deps-tcltk-8.6.12.0" +if exist "%BUILD_DIR%\externals\tcltk-8.6.12.0" rmdir /Q /S "%BUILD_DIR%\externals\tcltk-8.6.12.0" +7z x -y %BUILD_DIR%\externals\zips\tcltk-8.6.12.0.zip -o%BUILD_DIR%\externals +mv %BUILD_DIR%\externals\cpython-bin-deps-tcltk-8.6.12.0 %BUILD_DIR%\externals\tcltk-8.6.12.0 + +echo. +echo Extracting tix +if exist "%BUILD_DIR%\externals\cpython-source-deps-tix-8.4.3.6" rmdir /Q /S "%BUILD_DIR%\externals\cpython-source-deps-tix-8.4.3.6" +if exist "%BUILD_DIR%\externals\tix-8.4.3.6" rmdir /Q /S "%BUILD_DIR%\externals\tix-8.4.3.6" +7z x -y %BUILD_DIR%\externals\zips\tix-8.4.3.6.zip -o%BUILD_DIR%\externals +mv %BUILD_DIR%\externals\cpython-source-deps-tix-8.4.3.6 %BUILD_DIR%\externals\tix-8.4.3.6 + +echo. +echo Extracting tkinter/tk +if exist "%BUILD_DIR%\externals\cpython-source-deps-tk-8.6.12.0" rmdir /Q /S "%BUILD_DIR%\externals\cpython-source-deps-tk-8.6.12.0" +if exist "%BUILD_DIR%\externals\tk-8.6.12.0" rmdir /Q /S "%BUILD_DIR%\externals\tk-8.6.12.0" +7z x -y %BUILD_DIR%\externals\zips\tk-8.6.12.0.zip -o%BUILD_DIR%\externals +mv %BUILD_DIR%\externals\cpython-bin-deps-tk-8.6.12.0 %BUILD_DIR%\externals\tk-8.6.12.0 + +echo. +echo Extracting xz... +if exist "%BUILD_DIR%\externals\cpython-source-deps-xz-5.2.5" rmdir /Q /S "%BUILD_DIR%\externals\cpython-source-deps-xz-5.2.5" +if exist "%BUILD_DIR%\externals\xz-5.2.5" rmdir /Q /S "%BUILD_DIR%\externals\xz-5.2.5" +7z x -y %BUILD_DIR%\externals\zips\xz-5.2.5.zip -o%BUILD_DIR%\externals +mv %BUILD_DIR%\externals\cpython-source-deps-xz-5.2.5 %BUILD_DIR%\externals\xz-5.2.5 + +echo. +echo Extracting zlib... +if exist "%BUILD_DIR%\externals\cpython-source-deps-zlib-1.2.12" rmdir /Q /S "%BUILD_DIR%\externals\cpython-source-deps-zlib-1.2.12" +if exist "%BUILD_DIR%\externals\zlib-1.2.12" rmdir /Q /S "%BUILD_DIR%\externals\zlib-1.2.12" +7z x -y %BUILD_DIR%\externals\zips\zlib-1.2.12.zip -o%BUILD_DIR%\externals +mv %BUILD_DIR%\externals\cpython-source-deps-zlib-1.2.12 %BUILD_DIR%\externals\zlib-1.2.12 + +echo Extracting pip... +if exist "%BUILD_DIR%\externals\pip-24.0" rmdir /Q /S "%BUILD_DIR%\externals\pip-24.0" +7z x -y %BUILD_DIR%\externals\zips\pip-24.0.zip -o%BUILD_DIR%\externals + +REM Compilation + +cd %BUILD_DIR% +echo. + +REM Upgrade to current version of MSVC +echo. +echo *** devenv pcbuild.sln /upgrade +devenv pcbuild.sln /upgrade +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on devenv + exit 1 +) + +echo *** msbuild %BUILD_DIR%\PCBuild\pcbuild.sln /t:Build /m /nologo /v:m /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=%PLATFORM_TARGET% /p:BuildProjectReferences=false /p:OutDir=%PRODUCT_INSTALL%\ +msbuild %BUILD_DIR%\PCBuild\pcbuild.sln /t:Build /m /nologo /v:m /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=%PLATFORM_TARGET% /p:OutDir=%PRODUCT_INSTALL%\ +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on msbuild + exit 2 +) + +REM Installation of additional files +echo. +echo *** Installation of additional files +cd .. +xcopy /Y /I /E %BUILD_DIR%\include %PRODUCT_INSTALL%\include +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on xcopy include + exit 3 +) + +copy /Y %BUILD_DIR%\PC\pyconfig.h %PRODUCT_INSTALL%\include +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on copy PC\pyconfig.h + exit 4 +) + +xcopy /Y /I /E %BUILD_DIR%\lib %PRODUCT_INSTALL%\lib +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on xcopy lib + exit 5 +) + +REM some prequistes if compiled in Debug mode require the lib to be in folder libs +REM other ones require these static lib to be in the root directory +REM on purpose we don't use mklink, since this requires the user to have his node set in developer mode. +xcopy /Y %PRODUCT_INSTALL%\*.lib %PRODUCT_INSTALL%\libs\ +if NOT %ERRORLEVEL% == 0 ( + echo ERROR could not copy static libraries + exit 6 +) + +REM on purpose, we don't use mklink - requires admin rights... +copy /Y /B %PRODUCT_INSTALL%\python%LIB_TAG%.exe %PRODUCT_INSTALL%\python3.exe +if %SAT_DEBUG% == 1 ( + copy /Y /B %PRODUCT_INSTALL%\python_d.exe %PRODUCT_INSTALL%\python.exe + REM otherwise OmniORB does not compile... + copy /Y /B %PRODUCT_INSTALL%\libs\python39_d.lib %PRODUCT_INSTALL%\libs\python39.lib + copy /Y /B %PRODUCT_INSTALL%\libs\python_d.lib %PRODUCT_INSTALL%\libs\python.lib +) + +cd %PRODUCT_INSTALL%\ + +REM Add PIP support +set PYTHONHOME=%PRODUCT_INSTALL% +set PYTHON_ROOT_DIR=%PRODUCT_INSTALL% +set PYTHON_VERSION=3.9 +set PATH=%PRODUCT_INSTALL%;%PATH% +set PATH=%PRODUCT_INSTALL%\lib;%PATH% +set PYTHON_INCLUDE=%PRODUCT_INSTALL%\include +set PYTHONPATH=%PRODUCT_INSTALL%\lib;%PYTHONPATH% +set PYTHONPATH=%PRODUCT_INSTALL%\lib\site-packages;%PYTHONPATH% +set PYTHONBIN=%PRODUCT_INSTALL%\python.exe +set PATH=%PRODUCT_INSTALL%\Scripts;%PATH% + +%PRODUCT_INSTALL%\python.exe %BUILD_DIR%\externals\pip-24.0\get-pip.py --force-reinstall --no-setuptools --no-wheel --no-index --find-links=%BUILD_DIR%\externals\pip-24.0 + +REM In debug mode, we need to rename all _d.pyd to .pyd... don't ask why. Seems like a known bug in OmniORB. +if %SAT_DEBUG% == 1 ( + cd %PRODUCT_INSTALL% + powershell -Command "Get-ChildItem -File -Recurse *.pyd| ForEach-Object {if ((!$_.Name.EndsWith('_d.pyd'))) { $_ | Copy-Item -Destination {$_.Name -replace '.pyd','_d.pyd'}}}" + cd %PRODUCT_INSTALL%\lib\site-packages + powershell -Command "Get-ChildItem -File -Recurse *.pyd| ForEach-Object {if ((!$_.Name.EndsWith('_d.pyd'))) { $_ | Copy-Item -Destination {$_.Name -replace '.pyd','_d.pyd'}}}" +) + + +taskkill /F /IM "mspdbsrv.exe" + +echo. +echo ########## END diff --git a/products/compil_scripts/cython-0.29.37.bat b/products/compil_scripts/cython-0.29.37.bat new file mode 100644 index 0000000..3dc3209 --- /dev/null +++ b/products/compil_scripts/cython-0.29.37.bat @@ -0,0 +1,62 @@ +@echo off + +echo ########################################################################## +echo Cython %VERSION% +echo ########################################################################## + +REM install in python directly +SET INSTALL_CENTRALLY=1 + +IF NOT DEFINED SAT_DEBUG ( + SET SAT_DEBUG=0 +) + +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% + +echo. +echo -------------------------------------------------------------------------- +echo *** Launching "python.exe setup.py build" +echo -------------------------------------------------------------------------- +set BUILD_OPT= +REM not built by OCCT - see spns #20292 attached Excel document +REM if %SAT_DEBUG% == 1 ( +REM set BUILD_OPT=--debug +REM) + +%PYTHON_ROOT_DIR%\python.exe setup.py build %BUILD_OPT% + + +echo. +echo -------------------------------------------------------------------------- +echo *** Launching "python.exe setup.py install" +echo -------------------------------------------------------------------------- +if %INSTALL_CENTRALLY% == 1 ( + %PYTHON_ROOT_DIR%\python.exe setup.py install --old-and-unmanageable +) else ( + %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 --old-and-unmanageable +) +if NOT %ERRORLEVEL% == 0 ( + echo "ERROR on setup install" + exit 3 +) + +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.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.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'}}}" +) + +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/compil_scripts/numpy-1.26.4.bat b/products/compil_scripts/numpy-1.26.4.bat new file mode 100644 index 0000000..97dd410 --- /dev/null +++ b/products/compil_scripts/numpy-1.26.4.bat @@ -0,0 +1,63 @@ +@echo off + +echo ########################################################################## +echo numpy %VERSION% +echo ########################################################################## + +REM install in python directly +SET INSTALL_CENTRALLY=1 + +IF NOT DEFINED SAT_DEBUG ( + SET SAT_DEBUG=0 +) + +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 +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on xcopy + exit 1 +) + +cd %BUILD_DIR% + +set BLAS=None +set ATLAS=None +set LAPACK=None + +echo. +echo -------------------------------------------------------------------------- +echo Launching "python.exe setup.py build" +echo -------------------------------------------------------------------------- +set BUILD_OPT= +if %SAT_DEBUG% == 1 ( + set BUILD_OPT=--debug +) + +%PYTHON_ROOT_DIR%\python.exe setup.py build %BUILD_OPT% + +echo. +echo -------------------------------------------------------------------------- +echo Launching "python.exe setup.py install" +echo -------------------------------------------------------------------------- + +if %INSTALL_CENTRALLY% == 1 ( + %PYTHON_ROOT_DIR%\python.exe setup.py install --old-and-unmanageable +) else ( + %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 --old-and-unmanageable +) + +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on setup.py install + exit 3 +) + +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/compil_scripts/openturns-1.21.bat b/products/compil_scripts/openturns-1.21.bat index 93547b5..b37380c 100644 --- a/products/compil_scripts/openturns-1.21.bat +++ b/products/compil_scripts/openturns-1.21.bat @@ -180,6 +180,103 @@ echo ########################################################################## SET CMAKE_MODULE_OPTIONS=%CMAKE_OPTIONS% -DBUILD_DOC=OFF CALL:MODULE_BUILDER otsvm "%SOURCE_DIR%\otsvm-0.12" "%BUILD_DIR%\otsvm" "%PRODUCT_INSTALL%" "%CMAKE_MODULE_OPTIONS%" +echo +echo ########################################################################## +echo dill 5.1.0 +echo ########################################################################## +cd %BUILD_DIR% +mkdir dill +cd %BUILD_DIR%\dill +xcopy %SOURCE_DIR%\dill-0.3.4\* %BUILD_DIR%\dill /E /I /Q +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on xcopy + exit 3 +) + +%PYTHON_ROOT_DIR%\python.exe -m pip install --cache-dir=%BUILD_DIR%\cache\pip --prefix=%PRODUCT_INSTALL% dill-0.3.4-py2.py3-none-any.whl --no-deps +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on python setup.py + exit 3 +) + +echo +echo ########################################################################## +echo decorator 5.1.0 +echo ########################################################################## +cd %BUILD_DIR% +mkdir decorator +cd %BUILD_DIR%\decorator +xcopy %SOURCE_DIR%\decorator-5.1.0\* %BUILD_DIR%\decorator /E /I /Q +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on xcopy + exit 3 +) + +%PYTHON_ROOT_DIR%\python.exe -m pip install --cache-dir=%BUILD_DIR%\cache\pip --prefix=%PRODUCT_INSTALL% decorator-5.1.0-py3-none-any.whl --no-deps +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on python setup.py + exit 3 +) + +echo +echo ########################################################################## +echo threadpoolctl 3.0.0 +echo ########################################################################## +cd %BUILD_DIR% +mkdir threadpoolctl +cd %BUILD_DIR%\threadpoolctl +xcopy %SOURCE_DIR%\threadpoolctl-3.0.0\* %BUILD_DIR%\threadpoolctl /E /I /Q +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on xcopy + exit 3 +) + +%PYTHON_ROOT_DIR%\python.exe -m pip install --cache-dir=%BUILD_DIR%\cache\pip --prefix=%PRODUCT_INSTALL% threadpoolctl-3.0.0-py3-none-any.whl --no-deps +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on python setup.py + exit 3 +) + +echo +echo ########################################################################## +echo joblib 1.1.0 +echo ########################################################################## +cd %BUILD_DIR% +mkdir joblib +cd %BUILD_DIR%\joblib +xcopy %SOURCE_DIR%\joblib-1.1.0\* %BUILD_DIR%\joblib /E /I /Q +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on xcopy + exit 3 +) + +%PYTHON_ROOT_DIR%\python.exe -m pip install --cache-dir=%BUILD_DIR%\cache\pip --prefix=%PRODUCT_INSTALL% joblib-1.1.0-py2.py3-none-any.whl --no-deps +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on python setup.py + exit 3 +) + +echo +echo ########################################################################## +echo scikit-learn 0.24.2 +echo ########################################################################## +cd %BUILD_DIR% +mkdir scikit-learn +cd %BUILD_DIR%\scikit-learn +xcopy %SOURCE_DIR%\scikit-learn-0.24.2\* %BUILD_DIR%\scikit-learn /E /I /Q +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on xcopy + exit 3 +) + +tar zxf scikit-learn-0.24.2.tar.gz +cd scikit-learn-0.24.2 +%PYTHON_ROOT_DIR%\python.exe setup.py install --prefix=%PRODUCT_INSTALL% +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on python setup.py + exit 3 +) + echo ########################################################################## echo otfmi 0.15 echo ########################################################################## @@ -316,5 +413,12 @@ if NOT %ERRORLEVEL% == 0 ( exit 3 ) +if %PYTHON_VERSION% == 3.9 ( + copy /Y /B %PRODUCT_INSTALL%\bin\OT.dll %PRODUCT_INSTALL%\lib\site_packages\openturns\OT.dll + copy /Y /B %PRODUCT_INSTALL%\bin\otmoris.dll %PRODUCT_INSTALL%\lib\site_packages\openturns\otmoris.dll + copy /Y /B %PRODUCT_INSTALL%\bin\otrobopt.dll %PRODUCT_INSTALL%\lib\site_packages\openturns\otrobopt.dll + copy /Y /B %PRODUCT_INSTALL%\bin\otfftw.dll %PRODUCT_INSTALL%\lib\site_packages\openturns\otfftw.dll + copy /Y /B %PRODUCT_INSTALL%\bin\otsubsetinverse.dll %PRODUCT_INSTALL%\lib\site_packages\openturns\otsubsetinverse.dll +) echo echo "########## END" diff --git a/products/compil_scripts/pandas-1.5.3.bat b/products/compil_scripts/pandas-1.5.3.bat new file mode 100644 index 0000000..054b352 --- /dev/null +++ b/products/compil_scripts/pandas-1.5.3.bat @@ -0,0 +1,59 @@ +@echo off + +echo ########################################################################## +echo pandas %VERSION% +echo ########################################################################## + +REM install in python directly +SET INSTALL_CENTRALLY=1 + +IF NOT DEFINED SAT_DEBUG ( + SET SAT_DEBUG=0 +) + +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 +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on xcopy + exit 1 +) + +cd %BUILD_DIR% + +echo. +echo -------------------------------------------------------------------------- +echo Launching "python.exe setup.py build" +echo -------------------------------------------------------------------------- +set BUILD_OPT= +if %SAT_DEBUG% == 1 ( + set BUILD_OPT=--debug +) + +%PYTHON_ROOT_DIR%\python.exe setup.py build %BUILD_OPT% + +echo. +echo -------------------------------------------------------------------------- +echo Launching "python.exe setup.py install" +echo -------------------------------------------------------------------------- + +if %INSTALL_CENTRALLY% == 1 ( + %PYTHON_ROOT_DIR%\python.exe setup.py install --old-and-unmanageable +) else ( + %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 --old-and-unmanageable +) + +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on setup.py install + exit 3 +) + +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/compil_scripts/psutil-5.9.8.bat b/products/compil_scripts/psutil-5.9.8.bat new file mode 100644 index 0000000..ddd2ad1 --- /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 --old-and-unmanageable +) else ( + %PYTHONBIN% setup.py build %BUILD_OPT% install --prefix=%PRODUCT_INSTALL% --old-and-unmanageable +) +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on psutil running %PYTHONBIN% setup.py build %BUILD_OPT% install --prefix=%PRODUCT_INSTALL% --old-and-unmanageable + 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/compil_scripts/pybind11.bat b/products/compil_scripts/pybind11.bat new file mode 100644 index 0000000..292ed24 --- /dev/null +++ b/products/compil_scripts/pybind11.bat @@ -0,0 +1,59 @@ +@echo off + +echo ########################################################################## +echo pybind11 %VERSION% +echo ########################################################################## + +REM install in python directly +SET INSTALL_CENTRALLY=1 + +IF NOT DEFINED SAT_DEBUG ( + SET SAT_DEBUG=0 +) + +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 +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on xcopy + exit 1 +) + +cd %BUILD_DIR% + +echo. +echo -------------------------------------------------------------------------- +echo Launching "python.exe setup.py build" +echo -------------------------------------------------------------------------- +set BUILD_OPT= +if %SAT_DEBUG% == 1 ( + set BUILD_OPT=--debug +) + +%PYTHON_ROOT_DIR%\python.exe setup.py build %BUILD_OPT% + +echo. +echo -------------------------------------------------------------------------- +echo Launching "python.exe setup.py install" +echo -------------------------------------------------------------------------- + +if %INSTALL_CENTRALLY% == 1 ( + %PYTHON_ROOT_DIR%\python.exe setup.py install --old-and-unmanageable +) else ( + %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 --old-and-unmanageable +) + +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on setup.py install + exit 3 +) + +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/compil_scripts/scipy-1.6.2.bat b/products/compil_scripts/scipy-1.6.2.bat new file mode 100644 index 0000000..564fd6d --- /dev/null +++ b/products/compil_scripts/scipy-1.6.2.bat @@ -0,0 +1,59 @@ +@echo off + +echo ########################################################################## +echo scipy %VERSION% +echo ########################################################################## + +REM install in python directly +SET INSTALL_CENTRALLY=1 + +IF NOT DEFINED SAT_DEBUG ( + SET SAT_DEBUG=0 +) + +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% + +set BLAS=None +set ATLAS=None +set LAPACK=None + +cd %SOURCE_DIR% + +echo. +echo -------------------------------------------------------------------------- +echo Launching "python.exe setup.py build" +echo -------------------------------------------------------------------------- +set BUILD_OPT= +if %SAT_DEBUG% == 1 ( + set BUILD_OPT=--debug +) + +%PYTHON_ROOT_DIR%\python.exe setup.py build %BUILD_OPT% + +echo. +echo -------------------------------------------------------------------------- +echo Launching "python.exe setup.py install" +echo -------------------------------------------------------------------------- + +if %INSTALL_CENTRALLY% == 1 ( + %PYTHON_ROOT_DIR%\python.exe setup.py install --old-and-unmanageable +) else ( + %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 --old-and-unmanageable +) + +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on setup.py install + exit 3 +) + +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/compil_scripts/sip-5.5.0.bat b/products/compil_scripts/sip-5.5.0.bat index 1ac425e..84db1d0 100644 --- a/products/compil_scripts/sip-5.5.0.bat +++ b/products/compil_scripts/sip-5.5.0.bat @@ -26,15 +26,21 @@ set PYTHONPATH=%PYTHONPATH%;%PRODUCT_INSTALL%\Lib\site-packages echo. echo *** -%PYTHONBIN% setup.py build %BUILD_OPT% install --prefix=%PRODUCT_INSTALL% + +SET SETUP_EXTRA_OPTIONS=--old-and-unmanageable +if %PYTHON_VERSION% == 3.6 ( + SET SETUP_EXTRA_OPTIONS= +) + +%PYTHONBIN% setup.py build %BUILD_OPT% install --prefix=%PRODUCT_INSTALL% %SETUP_EXTRA_OPTIONS% if NOT %ERRORLEVEL% == 0 ( - echo ERROR on SIP running %PYTHONBIN% setup.py build %BUILD_OPT% install --prefix=%PRODUCT_INSTALL% + echo ERROR on SIP running %PYTHONBIN% setup.py build %BUILD_OPT% install --prefix=%PRODUCT_INSTALL% %SETUP_EXTRA_OPTIONS% exit 1 ) cd %BUILD_DIR%\PyQt5_sip-12.8.1 -%PYTHONBIN% setup.py build %BUILD_OPT% install --prefix=%PRODUCT_INSTALL% +%PYTHONBIN% setup.py build %BUILD_OPT% install --prefix=%PRODUCT_INSTALL% %SETUP_EXTRA_OPTIONS% if NOT %ERRORLEVEL% == 0 ( - echo ERROR on PYQT_SIP running %PYTHONBIN% setup.py build %BUILD_OPT% install --prefix=%PRODUCT_INSTALL% + echo ERROR on PYQT_SIP running %PYTHONBIN% setup.py build %BUILD_OPT% install --prefix=%PRODUCT_INSTALL% %SETUP_EXTRA_OPTIONS% exit 2 ) diff --git a/products/dateutil.pyconf b/products/dateutil.pyconf index dcc5764..5b4f4bd 100644 --- a/products/dateutil.pyconf +++ b/products/dateutil.pyconf @@ -31,3 +31,8 @@ default_win : compil_script : 'pip_install_whl' + $VARS.scriptExtension archive_info : {archive_name : "dateutil-" + $APPLICATION.products.dateutil + "_windows.tar.gz"} } + +version_2_8_2: +{ + archive_info : {archive_name : "dateutil-2.8.2.tar.gz"} +} diff --git a/products/decorator.pyconf b/products/decorator.pyconf new file mode 100644 index 0000000..acba5c0 --- /dev/null +++ b/products/decorator.pyconf @@ -0,0 +1,38 @@ +default : +{ + name : "decorator" + build_source : "script" + compil_script : "pip_install" + $VARS.scriptExtension + get_source : "archive" + system_info : + { + rpm : ["python3-decorator"] + rpm_dev : [] + apt : ["python3-decorator"] + apt_dev : [] + } + environ : + { + env_script : $name + ".py" + } + depend : ['Python'] + source_dir : $APPLICATION.workdir + $VARS.sep + 'SOURCES' + $VARS.sep + $name + build_dir : $APPLICATION.workdir + $VARS.sep + 'BUILD' + $VARS.sep + $name + install_dir : 'base' + properties: + { + incremental : "yes" + pip : "no" + } +} + +default_win : +{ + compil_script : 'pip_install_whl' + $VARS.scriptExtension + depend : ["Python","setuptools"] + properties: + { + incremental : "yes" + pip : "yes" + } +} diff --git a/products/env_scripts/decorator.py b/products/env_scripts/decorator.py new file mode 100644 index 0000000..eeebe59 --- /dev/null +++ b/products/env_scripts/decorator.py @@ -0,0 +1,10 @@ +#!/usr/bin/env python +#-*- coding:utf-8 -*- + +import os +import platform +def set_env(env, prereq_dir, version): + env.set("DECORATOR_ROOT_DIR",prereq_dir) + +def set_nativ_env(env): + pass diff --git a/products/env_scripts/joblib.py b/products/env_scripts/joblib.py new file mode 100644 index 0000000..dfe1935 --- /dev/null +++ b/products/env_scripts/joblib.py @@ -0,0 +1,10 @@ +#!/usr/bin/env python +#-*- coding:utf-8 -*- + +import os +import platform +def set_env(env, prereq_dir, version): + env.set("JOBLIB_ROOT_DIR",prereq_dir) + +def set_nativ_env(env): + pass diff --git a/products/env_scripts/omniORB.py b/products/env_scripts/omniORB.py index 78356b6..02bee47 100644 --- a/products/env_scripts/omniORB.py +++ b/products/env_scripts/omniORB.py @@ -12,6 +12,8 @@ def set_env(env, prereq_dir, version): env.prepend('PATH',os.path.join(prereq_dir, 'lib', 'x86_win32')) env.prepend( 'PYTHONPATH', os.path.join(prereq_dir, 'lib', 'python')) env.prepend( 'PYTHONPATH', os.path.join(prereq_dir, 'lib', 'x86_win32')) + env.set('OMNIORB_LIB_DIR',os.path.join(prereq_dir, 'lib', 'x86_win32')) + env.set('OMNIORB_BIN_DIR',os.path.join(prereq_dir, 'bin', 'x86_win32')) env.set("OMNIORB_USER_PATH", "%APPDATA%") else: env.prepend('PATH', os.path.join(prereq_dir, 'bin')) diff --git a/products/env_scripts/scikit_learn.py b/products/env_scripts/scikit_learn.py new file mode 100644 index 0000000..10cabad --- /dev/null +++ b/products/env_scripts/scikit_learn.py @@ -0,0 +1,10 @@ +#!/usr/bin/env python +#-*- coding:utf-8 -*- + +import os +import platform +def set_env(env, prereq_dir, version): + env.set("SCIKITLEARN_ROOT_DIR",prereq_dir) + +def set_nativ_env(env): + pass diff --git a/products/env_scripts/threadpoolctl.py b/products/env_scripts/threadpoolctl.py new file mode 100644 index 0000000..2684828 --- /dev/null +++ b/products/env_scripts/threadpoolctl.py @@ -0,0 +1,10 @@ +#!/usr/bin/env python +#-*- coding:utf-8 -*- + +import os +import platform +def set_env(env, prereq_dir, version): + env.set("THREADPOOLCTL_ROOT_DIR",prereq_dir) + +def set_nativ_env(env): + pass diff --git a/products/joblib.pyconf b/products/joblib.pyconf new file mode 100644 index 0000000..706cf1d --- /dev/null +++ b/products/joblib.pyconf @@ -0,0 +1,38 @@ +default : +{ + name : "joblib" + build_source : "script" + compil_script : "pip_install" + $VARS.scriptExtension + get_source : "archive" + system_info : + { + rpm : ["python3-joblib"] + rpm_dev : [] + apt : ["python3-joblib"] + apt_dev : [] + } + environ : + { + env_script : $name + ".py" + } + depend : ['Python'] + source_dir : $APPLICATION.workdir + $VARS.sep + 'SOURCES' + $VARS.sep + $name + build_dir : $APPLICATION.workdir + $VARS.sep + 'BUILD' + $VARS.sep + $name + install_dir : 'base' + properties: + { + incremental : "yes" + pip : "no" + } +} + +default_win : +{ + compil_script : 'pip_install_whl' + $VARS.scriptExtension + depend : ["Python","setuptools", "threadpoolctl"] + properties: + { + incremental : "yes" + pip : "yes" + } +} diff --git a/products/matplotlib.pyconf b/products/matplotlib.pyconf index 16003d0..c405620 100755 --- a/products/matplotlib.pyconf +++ b/products/matplotlib.pyconf @@ -35,7 +35,7 @@ default_win : compil_script : 'pip_install_whl' + $VARS.scriptExtension archive_info : {archive_name : "matplotlib-" + $APPLICATION.products.matplotlib + "_windows.tar.gz"} depend : ['Python', 'PyQt', 'numpy', 'freetype', 'six', 'pytz', 'pyparsing', 'dateutil', 'setuptools', 'cycler'] - opt_depend : ['kiwisolver'] + opt_depend : ['kiwisolver', 'Pillow'] properties: { incremental : "yes" @@ -53,6 +53,16 @@ version_3_3_4 : } } +version_3_3_4_win : +{ + archive_info : {archive_name : "matplotlib-3.3.4.tar.gz"} + properties: + { + pip : "yes" + incremental : "yes" + } +} + version_2_2_2 : { properties: 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/opencv.pyconf b/products/opencv.pyconf index 7182981..efbb175 100644 --- a/products/opencv.pyconf +++ b/products/opencv.pyconf @@ -69,7 +69,10 @@ version_3_2_0_DB12 : version_3_2_0_win : { - patches : ["opencv-3.2.0-ccache.patch","opencv-3.2.0_windows.patch"] + patches : ["opencv-3.2.0-ccache.patch", + "opencv-3.2.0_windows.patch", + "SPNS-29988-opencv-3.2.0-cv2.patch" + ] } version_3_2_0_with_ffmpeg : diff --git a/products/pandas.pyconf b/products/pandas.pyconf index 5c6a225..1073b86 100644 --- a/products/pandas.pyconf +++ b/products/pandas.pyconf @@ -26,6 +26,20 @@ default : } } +version_1_5_3 : +{} + +version_1_5_3_win: +{ + compil_script: "pandas-1.5.3.bat" + archive_info : {archive_name : "pandas-1.5.3.tar.gz"} + properties: + { + incremental : "yes" + pip : "no" + } +} + version_1_1_5_no_pip : { compil_script : "pandas-1.1.5.sh" diff --git a/products/patches/PyFMI-2.6-importlogger.patch b/products/patches/PyFMI-2.6-importlogger.patch new file mode 100644 index 0000000..38a3d7a --- /dev/null +++ b/products/patches/PyFMI-2.6-importlogger.patch @@ -0,0 +1,24 @@ +diff -Naur PyFMI/src/pyfmi/fmi.pyx PyFMI_dev/src/pyfmi/fmi.pyx +--- PyFMI/src/pyfmi/fmi.pyx 2020-03-04 22:13:53.000000000 +0100 ++++ PyFMI_dev/src/pyfmi/fmi.pyx 2024-02-14 15:24:51.801418608 +0100 +@@ -151,17 +151,17 @@ + FMI_OUTPUTS = 2 + + #CALLBACKS +-cdef void importlogger(FMIL.jm_callbacks* c, FMIL.jm_string module, FMIL.jm_log_level_enu_t log_level, FMIL.jm_string message): ++cdef void importlogger(FMIL.jm_callbacks* c, FMIL.jm_string module, FMIL.jm_log_level_enu_t log_level, FMIL.jm_string message) noexcept: + if c.context != NULL: + (c.context)._logger(module,log_level,message) + + #CALLBACKS +-cdef void importlogger2(FMIL.jm_callbacks* c, FMIL.jm_string module, FMIL.jm_log_level_enu_t log_level, FMIL.jm_string message): ++cdef void importlogger2(FMIL.jm_callbacks* c, FMIL.jm_string module, FMIL.jm_log_level_enu_t log_level, FMIL.jm_string message) noexcept: + if c.context != NULL: + (c.context)._logger(module, log_level, message) + + #CALLBACKS +-cdef void importlogger_load_fmu(FMIL.jm_callbacks* c, FMIL.jm_string module, FMIL.jm_log_level_enu_t log_level, FMIL.jm_string message): ++cdef void importlogger_load_fmu(FMIL.jm_callbacks* c, FMIL.jm_string module, FMIL.jm_log_level_enu_t log_level, FMIL.jm_string message) noexcept: + (c.context).append("FMIL: module = %s, log level = %d: %s"%(module, log_level, message)) + + cdef class ModelBase: diff --git a/products/patches/python-3.9.14.01-ctype-init.patch b/products/patches/python-3.9.14.01-ctype-init.patch new file mode 100644 index 0000000..37a56f3 --- /dev/null +++ b/products/patches/python-3.9.14.01-ctype-init.patch @@ -0,0 +1,18 @@ +--- Python-3.9.14-ref/Lib/ctypes/__init__.py 2022-09-06 19:26:16.000000000 +0200 ++++ Python-3.9.14-new/Lib/ctypes/__init__.py 2024-04-03 17:34:16.000000000 +0200 +@@ -364,7 +364,14 @@ + if '/' in name or '\\' in name: + self._name = nt._getfullpathname(self._name) + mode |= nt._LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR +- ++ # PATH is how DLL lookup has always worked in the past ++ # in Python on Windows. IMHO both the above mode flags ++ # are not wanted and cause many serious regressions within ++ # the conda ecosystem on Windows. We should however ++ # propagate any PATH changes that have happened to Python ++ # library and that is not yet implemented. ++ LOAD_WITH_ALTERED_SEARCH_PATH = 0x00000008 ++ mode = LOAD_WITH_ALTERED_SEARCH_PATH + class _FuncPtr(_CFuncPtr): + _flags_ = flags + _restype_ = self._func_restype_ diff --git a/products/patches/python-3.9.14.02-os.py.patch b/products/patches/python-3.9.14.02-os.py.patch new file mode 100644 index 0000000..202a787 --- /dev/null +++ b/products/patches/python-3.9.14.02-os.py.patch @@ -0,0 +1,11 @@ +--- Python-3.9.14-ref/Lib/os.py 2022-09-06 19:26:16.000000000 +0200 ++++ Python-3.9.14-new/Lib/os.py 2024-04-03 16:58:24.000000000 +0200 +@@ -1107,6 +1107,8 @@ + Remove the directory by calling close() on the returned object or + using it in a with statement. + """ ++ #FIXME SALOME ++ return + import nt + cookie = nt._add_dll_directory(path) + return _AddedDllDirectory( diff --git a/products/patches/python-3.9.14.03-getpath.patch b/products/patches/python-3.9.14.03-getpath.patch new file mode 100644 index 0000000..11d818e --- /dev/null +++ b/products/patches/python-3.9.14.03-getpath.patch @@ -0,0 +1,29 @@ +--- Python-3.9.14-ref/PC/getpathp.c 2022-09-06 19:26:16.000000000 +0200 ++++ Python-3.9.14-new/PC/getpathp.c 2024-04-03 17:13:22.000000000 +0200 +@@ -1116,7 +1116,7 @@ + if (!get_dllpath(py3path)) { + reduce(py3path); + join(py3path, PY3_DLLNAME); +- hPython3 = LoadLibraryExW(py3path, NULL, LOAD_LIBRARY_SEARCH_DEFAULT_DIRS); ++ hPython3 = LoadLibraryExW(py3path, NULL, LOAD_WITH_ALTERED_SEARCH_PATH); + if (hPython3 != NULL) { + return 1; + } +@@ -1124,7 +1124,7 @@ + + /* If we can locate python3.dll in our application dir, + use that DLL */ +- hPython3 = LoadLibraryExW(PY3_DLLNAME, NULL, LOAD_LIBRARY_SEARCH_APPLICATION_DIR); ++ hPython3 = LoadLibraryExW(PY3_DLLNAME, NULL, LOAD_WITH_ALTERED_SEARCH_PATH); + if (hPython3 != NULL) { + return 1; + } +@@ -1134,7 +1134,7 @@ + wcscpy(py3path, Py_GetPrefix()); + if (py3path[0]) { + join(py3path, L"DLLs\\" PY3_DLLNAME); +- hPython3 = LoadLibraryExW(py3path, NULL, LOAD_LIBRARY_SEARCH_DEFAULT_DIRS); ++ hPython3 = LoadLibraryExW(py3path, NULL, LOAD_WITH_ALTERED_SEARCH_PATH); + } + return hPython3 != NULL; + } diff --git a/products/patches/python-3.9.14.04-dynload_win.patch b/products/patches/python-3.9.14.04-dynload_win.patch new file mode 100644 index 0000000..db09543 --- /dev/null +++ b/products/patches/python-3.9.14.04-dynload_win.patch @@ -0,0 +1,13 @@ +--- Python-3.9.14-ref/Python/dynload_win.c 2022-09-06 19:26:16.000000000 +0200 ++++ Python-3.9.14-new/Python/dynload_win.c 2024-04-03 17:08:02.000000000 +0200 +@@ -191,9 +191,7 @@ + AddDllDirectory function. We add SEARCH_DLL_LOAD_DIR to + ensure DLLs adjacent to the PYD are preferred. */ + Py_BEGIN_ALLOW_THREADS +- hDLL = LoadLibraryExW(wpathname, NULL, +- LOAD_LIBRARY_SEARCH_DEFAULT_DIRS | +- LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR); ++ hDLL = LoadLibraryExW(wpathname, NULL,LOAD_WITH_ALTERED_SEARCH_PATH); + Py_END_ALLOW_THREADS + + /* restore old error mode settings */ 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: { diff --git a/products/pyreadline.pyconf b/products/pyreadline.pyconf index e666780..79d0147 100755 --- a/products/pyreadline.pyconf +++ b/products/pyreadline.pyconf @@ -37,3 +37,16 @@ default_win : pip : "yes" } } + +version_3_4_1 : +{ +} + +version_3_4_1_win : +{ + name : "pyreadline3" + environ : + { + env_script : "pyreadline.py" + } +} diff --git a/products/pytz.pyconf b/products/pytz.pyconf index c78b30d..7aa88f1 100644 --- a/products/pytz.pyconf +++ b/products/pytz.pyconf @@ -31,3 +31,8 @@ default_win : compil_script : 'pip_install_whl' + $VARS.scriptExtension archive_info : {archive_name : "pytz-" + $APPLICATION.products.pytz + "_windows.tar.gz"} } + +version_2020_1 : +{ + archive_info : {archive_name : "pytz-2020.1.tar.gz"} +} diff --git a/products/scikit_learn.pyconf b/products/scikit_learn.pyconf new file mode 100644 index 0000000..05f7c6a --- /dev/null +++ b/products/scikit_learn.pyconf @@ -0,0 +1,38 @@ +default : +{ + name : "scikit_learn" + build_source : "script" + compil_script : "pip_install" + $VARS.scriptExtension + get_source : "archive" + system_info : + { + rpm : ["python3-scikit-learn"] + rpm_dev : [] + apt : ["python3-scikit-learn"] + apt_dev : [] + } + environ : + { + env_script : $name + ".py" + } + depend : ['Python', 'scipy'] + source_dir : $APPLICATION.workdir + $VARS.sep + 'SOURCES' + $VARS.sep + $name + build_dir : $APPLICATION.workdir + $VARS.sep + 'BUILD' + $VARS.sep + $name + install_dir : 'base' + properties: + { + incremental : "yes" + pip : "no" + } +} + +default_win : +{ + compil_script : 'pip_install_whl' + $VARS.scriptExtension + depend : ["Python","setuptools", "scipy", "joblib"] + properties: + { + incremental : "yes" + pip : "yes" + } +} diff --git a/products/scipy.pyconf b/products/scipy.pyconf index 35c4d02..07c0a0a 100755 --- a/products/scipy.pyconf +++ b/products/scipy.pyconf @@ -33,6 +33,23 @@ default_win : archive_info : {archive_name : "scipy-" + $APPLICATION.products.scipy + "_windows.tar.gz"} } +version_1_6_2: +{ +} + +version_1_6_2_win: +{ + compil_script : "scipy-1.6.2.bat" + properties : + { + incremental : "yes" + pip : "yes" + } + archive_info : {archive_name : "scipy-1.6.2.tar.gz"} + depend : ['numpy','lapack', 'openblas'] + opt_depend : ['pybind11'] +} + version_1_5_2_no_pip : { compil_script : "scipy-1.5.2.sh" diff --git a/products/threadpoolctl.pyconf b/products/threadpoolctl.pyconf new file mode 100644 index 0000000..813e678 --- /dev/null +++ b/products/threadpoolctl.pyconf @@ -0,0 +1,38 @@ +default : +{ + name : "threadpoolctl" + build_source : "script" + compil_script : "pip_install" + $VARS.scriptExtension + get_source : "archive" + system_info : + { + rpm : ["python3-threadpoolctl"] + rpm_dev : [] + apt : ["python3-threadpoolctl"] + apt_dev : [] + } + environ : + { + env_script : $name + ".py" + } + depend : ['Python'] + source_dir : $APPLICATION.workdir + $VARS.sep + 'SOURCES' + $VARS.sep + $name + build_dir : $APPLICATION.workdir + $VARS.sep + 'BUILD' + $VARS.sep + $name + install_dir : 'base' + properties: + { + incremental : "yes" + pip : "no" + } +} + +default_win : +{ + compil_script : 'pip_install_whl' + $VARS.scriptExtension + depend : ["Python","setuptools", "scipy", "decorator"] + properties: + { + incremental : "yes" + pip : "yes" + } +}