From 80ac9641b6ef9bdff105dd1e716ccf11298553e0 Mon Sep 17 00:00:00 2001 From: Nabil Ghodbane Date: Sun, 8 Sep 2024 15:21:21 +0200 Subject: [PATCH] bos #42835: support W10 --- applications/SALOME-master-windows.pyconf | 12 ++++++- products/BasicIterativeStatistics.pyconf | 15 +++++++-- products/attrs.pyconf | 27 ++++++++++++++++ products/build.pyconf | 27 ++++++++++++++++ .../BasicIterativeStatistics.bat | 31 +++++++++++++++++++ products/compil_scripts/pytest.bat | 31 +++++++++++++++++++ products/env_scripts/attrs.py | 16 ++++++++++ products/env_scripts/build.py | 16 ++++++++++ products/env_scripts/exceptiongroup.py | 16 ++++++++++ products/env_scripts/iniconfig.py | 16 ++++++++++ products/env_scripts/pluggy.py | 16 ++++++++++ products/exceptiongroup.pyconf | 27 ++++++++++++++++ products/iniconfig.pyconf | 27 ++++++++++++++++ products/pluggy.pyconf | 27 ++++++++++++++++ products/poetry.pyconf | 10 ++++++ products/poetry_core.pyconf | 9 ++++++ products/pytest.pyconf | 10 ++++++ products/pyyaml.pyconf | 9 ++++++ 18 files changed, 339 insertions(+), 3 deletions(-) create mode 100644 products/attrs.pyconf create mode 100644 products/build.pyconf create mode 100644 products/compil_scripts/BasicIterativeStatistics.bat create mode 100644 products/compil_scripts/pytest.bat create mode 100644 products/env_scripts/attrs.py create mode 100644 products/env_scripts/build.py create mode 100644 products/env_scripts/exceptiongroup.py create mode 100644 products/env_scripts/iniconfig.py create mode 100644 products/env_scripts/pluggy.py create mode 100644 products/exceptiongroup.pyconf create mode 100644 products/iniconfig.pyconf create mode 100644 products/pluggy.pyconf diff --git a/applications/SALOME-master-windows.pyconf b/applications/SALOME-master-windows.pyconf index 1e8be28..92ae261 100644 --- a/applications/SALOME-master-windows.pyconf +++ b/applications/SALOME-master-windows.pyconf @@ -7,7 +7,7 @@ APPLICATION : workdir : $LOCAL.workdir + $VARS.sep + $APPLICATION.name cmake_generator : 'Visual Studio 15 2017' cmake_build_type: 'Release' # Debug, RelWithDebInfo, Release, MinSizeRel - tag : 'master' + tag : 'master' dev : 'no' verbose : 'no' debug : 'no' @@ -41,7 +41,10 @@ APPLICATION : { # PREREQUISITES : alabaster : '0.7.16' + attrs : '24.2.0' Babel : '2.7.0' + BasicIterativeStatistics : 'v0.1.0' + build : '1.1.1' boost : '1.67.0' CAS : {tag:'CR780-SALOME-PATCH', section:'version_CR780_SALOME_PATCH_win', base: 'no'} certifi : '2019.6.16' @@ -62,6 +65,7 @@ APPLICATION : doxygen : '1.8.3.1' eigen : '3.3.4' embree : '3.12.2' + exceptiongroup : '1.2.2' expat : '2.0.1' f2c : '1.0.0' fftw: '3.3.9' @@ -74,6 +78,7 @@ APPLICATION : h5py : '3.11.0' idna : '2.8' imagesize : '1.1.0' + iniconfig : '2.0.0' ispc : '1.15.0' Jinja2 : '2.10.1' kiwisolver : '1.4.5' @@ -115,6 +120,10 @@ APPLICATION : perl : '5.28.1.1' Pillow : '10.2.0' planegcs : '0.18-3cb6890' + pluggy : '1.5.0' + poetry_core : '1.9.0' + pyyaml: '6.0' + pytest : '8.3.2' psutil : '5.9.8' pthreads : '2.9.1' PyFMI : '2.6' @@ -150,6 +159,7 @@ APPLICATION : swig : '4.0.2' tbb : '2019_U8_win' toml : '0.10.2' + tomli : '2.0.1' tcltk : '8.6.9' urllib3 : '1.25.3' zlib : '1.2.5' diff --git a/products/BasicIterativeStatistics.pyconf b/products/BasicIterativeStatistics.pyconf index d930e38..236d4cd 100644 --- a/products/BasicIterativeStatistics.pyconf +++ b/products/BasicIterativeStatistics.pyconf @@ -15,7 +15,8 @@ default : { env_script: $name + ".py" } - depend : ['Python', 'setuptools', 'numpy', 'pyyaml', 'openturns', 'poetry', 'pytest'] + depend : ['Python', 'setuptools', 'numpy', 'pyyaml', 'openturns', 'poetry_core', 'pytest'] + opt_depend: ['poetry'] patches : [] source_dir : $APPLICATION.workdir + $VARS.sep + 'SOURCES' + $VARS.sep + $name build_dir : $APPLICATION.workdir + $VARS.sep + 'BUILD' + $VARS.sep + $name @@ -27,7 +28,17 @@ default : } } +default_win : +{ + properties : + { + incremental : "yes" + pip : "no" + single_install_dir: 'no' + } +} + version_v0_1_0: { - patches: ['basicIterativeStatistics-pyver.patch'] + patches: ['basicIterativeStatistics-pyver.patch'] } diff --git a/products/attrs.pyconf b/products/attrs.pyconf new file mode 100644 index 0000000..58fe5cb --- /dev/null +++ b/products/attrs.pyconf @@ -0,0 +1,27 @@ +default : +{ + name : "attrs" + build_source : "script" + compil_script : 'pip_install' + $VARS.scriptExtension + get_source : "archive" + system_info : + { + rpm : ["python3-attrs"] + rpm_dev : [] + apt : ["python3-attrs"] + apt_dev : [] + } + environ : + { + env_script : $name + ".py" + } + depend : ['Python', 'setuptools', 'numpy', 'openturns', 'Cython', 'pluggy'] + 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 : "yes" + } +} diff --git a/products/build.pyconf b/products/build.pyconf new file mode 100644 index 0000000..6b20242 --- /dev/null +++ b/products/build.pyconf @@ -0,0 +1,27 @@ +default : +{ + name : "build" + build_source : "script" + compil_script : 'pip_install' + $VARS.scriptExtension + get_source : "archive" + system_info : + { + rpm : ["python3-build"] + rpm_dev : [] + apt : ["python3-build"] + apt_dev : [] + } + environ : + { + env_script : $name + ".py" + } + depend : ['Python', 'setuptools', 'numpy', 'openturns', 'Cython', 'poetry_core'] + 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 : "yes" + } +} diff --git a/products/compil_scripts/BasicIterativeStatistics.bat b/products/compil_scripts/BasicIterativeStatistics.bat new file mode 100644 index 0000000..0e33f8c --- /dev/null +++ b/products/compil_scripts/BasicIterativeStatistics.bat @@ -0,0 +1,31 @@ +@echo off + +echo ########################################################################## +echo BasicIterativeStatistics %VERSION% +echo ########################################################################## + +if NOT exist "%PRODUCT_INSTALL%" mkdir %PRODUCT_INSTALL% + +REM clean BUILD directory +if exist "%BUILD_DIR%" rmdir /Q /S %BUILD_DIR% +mkdir %BUILD_DIR%\cache\pip + +cd %SOURCE_DIR% +xcopy * %BUILD_DIR%\ /E /I /Q +cd %BUILD_DIR% + +REM Ensure that BasicIterativeStatistics is not present. +%PYTHON_ROOT_DIR%\python.exe -m pip uninstall -y iterative_stats + +%PYTHON_ROOT_DIR%\python.exe -m pip install --cache-dir=%BUILD_DIR%\cache\pip . --no-deps --no-build-isolation +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on python -m pip 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/pytest.bat b/products/compil_scripts/pytest.bat new file mode 100644 index 0000000..6ca08de --- /dev/null +++ b/products/compil_scripts/pytest.bat @@ -0,0 +1,31 @@ +@echo off + +echo ########################################################################## +echo pytest %VERSION% +echo ########################################################################## + +if NOT exist "%PRODUCT_INSTALL%" mkdir %PRODUCT_INSTALL% + +REM clean BUILD directory +if exist "%BUILD_DIR%" rmdir /Q /S %BUILD_DIR% +mkdir %BUILD_DIR%\cache\pip + +cd %SOURCE_DIR% +xcopy * %BUILD_DIR%\ /E /I /Q +cd %BUILD_DIR% + +REM Ensure that pytest is not present. +%PYTHON_ROOT_DIR%\python.exe -m pip uninstall -y pytest + +%PYTHON_ROOT_DIR%\python.exe setup.py install +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on python setup.py + 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/env_scripts/attrs.py b/products/env_scripts/attrs.py new file mode 100644 index 0000000..268814a --- /dev/null +++ b/products/env_scripts/attrs.py @@ -0,0 +1,16 @@ +#!/usr/bin/env python +#-*- coding:utf-8 -*- + +import os.path, platform + +def set_env(env, prereq_dir, version): + env.set("ATTRS_ROOT_DIR",prereq_dir) + + versionPython = env.get('PYTHON_VERSION') + if not platform.system() == "Windows" : + env.prepend('PYTHONPATH',os.path.join(prereq_dir, 'lib', 'python' + versionPython, 'site-packages')) + env.prepend('PATH', os.path.join(prereq_dir, 'bin')) + env.prepend('PYTHONPATH',os.path.join(prereq_dir, 'bin')) + +def set_nativ_env(env): + pass diff --git a/products/env_scripts/build.py b/products/env_scripts/build.py new file mode 100644 index 0000000..587ea3c --- /dev/null +++ b/products/env_scripts/build.py @@ -0,0 +1,16 @@ +#!/usr/bin/env python +#-*- coding:utf-8 -*- + +import os.path, platform + +def set_env(env, prereq_dir, version): + env.set("BUILDPY_ROOT_DIR",prereq_dir) + + versionPython = env.get('PYTHON_VERSION') + if not platform.system() == "Windows" : + env.prepend('PYTHONPATH',os.path.join(prereq_dir, 'lib', 'python' + versionPython, 'site-packages')) + env.prepend('PATH', os.path.join(prereq_dir, 'bin')) + env.prepend('PYTHONPATH',os.path.join(prereq_dir, 'bin')) + +def set_nativ_env(env): + pass diff --git a/products/env_scripts/exceptiongroup.py b/products/env_scripts/exceptiongroup.py new file mode 100644 index 0000000..cfee035 --- /dev/null +++ b/products/env_scripts/exceptiongroup.py @@ -0,0 +1,16 @@ +#!/usr/bin/env python +#-*- coding:utf-8 -*- + +import os.path, platform + +def set_env(env, prereq_dir, version): + env.set("EXCEPTIONGROUP_ROOT_DIR",prereq_dir) + + versionPython = env.get('PYTHON_VERSION') + if not platform.system() == "Windows" : + env.prepend('PYTHONPATH',os.path.join(prereq_dir, 'lib', 'python' + versionPython, 'site-packages')) + env.prepend('PATH', os.path.join(prereq_dir, 'bin')) + env.prepend('PYTHONPATH',os.path.join(prereq_dir, 'bin')) + +def set_nativ_env(env): + pass diff --git a/products/env_scripts/iniconfig.py b/products/env_scripts/iniconfig.py new file mode 100644 index 0000000..508f925 --- /dev/null +++ b/products/env_scripts/iniconfig.py @@ -0,0 +1,16 @@ +#!/usr/bin/env python +#-*- coding:utf-8 -*- + +import os.path, platform + +def set_env(env, prereq_dir, version): + env.set("INICONFIG_ROOT_DIR",prereq_dir) + + versionPython = env.get('PYTHON_VERSION') + if not platform.system() == "Windows" : + env.prepend('PYTHONPATH',os.path.join(prereq_dir, 'lib', 'python' + versionPython, 'site-packages')) + env.prepend('PATH', os.path.join(prereq_dir, 'bin')) + env.prepend('PYTHONPATH',os.path.join(prereq_dir, 'bin')) + +def set_nativ_env(env): + pass diff --git a/products/env_scripts/pluggy.py b/products/env_scripts/pluggy.py new file mode 100644 index 0000000..6352037 --- /dev/null +++ b/products/env_scripts/pluggy.py @@ -0,0 +1,16 @@ +#!/usr/bin/env python +#-*- coding:utf-8 -*- + +import os.path, platform + +def set_env(env, prereq_dir, version): + env.set("PLUGGY_ROOT_DIR",prereq_dir) + + versionPython = env.get('PYTHON_VERSION') + if not platform.system() == "Windows" : + env.prepend('PYTHONPATH',os.path.join(prereq_dir, 'lib', 'python' + versionPython, 'site-packages')) + env.prepend('PATH', os.path.join(prereq_dir, 'bin')) + env.prepend('PYTHONPATH',os.path.join(prereq_dir, 'bin')) + +def set_nativ_env(env): + pass diff --git a/products/exceptiongroup.pyconf b/products/exceptiongroup.pyconf new file mode 100644 index 0000000..2afaae3 --- /dev/null +++ b/products/exceptiongroup.pyconf @@ -0,0 +1,27 @@ +default : +{ + name : "exceptiongroup" + build_source : "script" + compil_script : 'pip_install' + $VARS.scriptExtension + get_source : "archive" + system_info : + { + rpm : [] + rpm_dev : [] + apt : [] + apt_dev : [] + } + environ : + { + env_script : $name + ".py" + } + depend : ['Python', 'setuptools', 'numpy', 'openturns', 'Cython', 'pluggy'] + 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 : "yes" + } +} diff --git a/products/iniconfig.pyconf b/products/iniconfig.pyconf new file mode 100644 index 0000000..029c5f8 --- /dev/null +++ b/products/iniconfig.pyconf @@ -0,0 +1,27 @@ +default : +{ + name : "iniconfig" + build_source : "script" + compil_script : 'pip_install' + $VARS.scriptExtension + get_source : "archive" + system_info : + { + rpm : ["python3-iniconfig"] + rpm_dev : [] + apt : ["python3-iniconfig"] + apt_dev : [] + } + environ : + { + env_script : $name + ".py" + } + depend : ['Python', 'setuptools', 'numpy', 'openturns', 'Cython', 'pluggy'] + 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 : "yes" + } +} diff --git a/products/pluggy.pyconf b/products/pluggy.pyconf new file mode 100644 index 0000000..7142c5f --- /dev/null +++ b/products/pluggy.pyconf @@ -0,0 +1,27 @@ +default : +{ + name : "pluggy" + build_source : "script" + compil_script : 'pip_install' + $VARS.scriptExtension + get_source : "archive" + system_info : + { + rpm : ["python3-pluggy"] + rpm_dev : [] + apt : ["python3-pluggy"] + apt_dev : [] + } + environ : + { + env_script : $name + ".py" + } + depend : ['Python', 'setuptools', 'numpy', 'openturns', 'Cython'] + 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 : "yes" + } +} diff --git a/products/poetry.pyconf b/products/poetry.pyconf index ddb1327..46fd183 100644 --- a/products/poetry.pyconf +++ b/products/poetry.pyconf @@ -18,6 +18,7 @@ default : env_script : $name + ".py" } depend : ['Python', 'setuptools', 'numpy', 'openturns', 'Cython', 'pyyaml', 'pytest', 'poetry_core'] + opt_depend : ['build'] source_dir : $APPLICATION.workdir + $VARS.sep + 'SOURCES' + $VARS.sep + $name build_dir : $APPLICATION.workdir + $VARS.sep + 'BUILD' + $VARS.sep + $name install_dir : 'base' @@ -28,6 +29,15 @@ default : } } +default_win: +{ + properties: + { + incremental : "yes" + pip : "yes" + } +} + version_1_5_1_x86_64: { compil_script: "poetry-1.5.1.sh" diff --git a/products/poetry_core.pyconf b/products/poetry_core.pyconf index 294c6a1..4611bfe 100644 --- a/products/poetry_core.pyconf +++ b/products/poetry_core.pyconf @@ -28,6 +28,15 @@ default : } } +default_win: +{ + properties: + { + incremental : "yes" + pip : "yes" + } +} + version_1_9_0_x86_64: { compil_script: "poetry_core-1.9.0.sh" diff --git a/products/pytest.pyconf b/products/pytest.pyconf index 4fdfb9b..89b5a12 100644 --- a/products/pytest.pyconf +++ b/products/pytest.pyconf @@ -27,3 +27,13 @@ default : pip : "no" } } + +default_win : +{ + properties : + { + incremental : "yes" + pip : "yes" + } + depend : ['Python', 'setuptools', 'numpy', 'openturns', 'Cython', 'iniconfig', 'exceptiongroup', 'tomli'] +} diff --git a/products/pyyaml.pyconf b/products/pyyaml.pyconf index 1417723..fd33a96 100644 --- a/products/pyyaml.pyconf +++ b/products/pyyaml.pyconf @@ -28,6 +28,15 @@ default : } } +default_win: +{ + properties: + { + incremental : "yes" + pip : "yes" + } +} + version_6_0_x86_64: { compil_script: "pyyaml-6.0.sh" -- 2.39.2