From d42ab3f98759a1f7a2cca35f830e822628c5e3b8 Mon Sep 17 00:00:00 2001 From: Guytri KASTANE Date: Fri, 2 Feb 2024 10:04:16 +0100 Subject: [PATCH] spns #40695: Add modifications for Python 3.9.14 --- applications/SALOME-master.pyconf | 17 ++++++++----- products/boost.pyconf | 6 +++++ products/compil_scripts/matplotlib.sh | 8 +++--- products/compil_scripts/mpi4py.sh | 31 +++++++++++++++++++++++ products/compil_scripts/openturns-1.21.sh | 11 +++++--- products/compil_scripts/sip-5.5.0.sh | 7 ++++- products/env_scripts/mpi4py.py | 1 + products/matplotlib.pyconf | 10 ++++++++ products/mpi4py.pyconf | 10 ++++++++ products/opencv.pyconf | 5 +++- 10 files changed, 91 insertions(+), 15 deletions(-) create mode 100755 products/compil_scripts/mpi4py.sh diff --git a/applications/SALOME-master.pyconf b/applications/SALOME-master.pyconf index d9695d6..58864d5 100644 --- a/applications/SALOME-master.pyconf +++ b/applications/SALOME-master.pyconf @@ -70,9 +70,9 @@ APPLICATION : imagesize : '1.0.0' ispc : '1.15.0' Jinja2 : '2.7.3' - kiwisolver : '1.0.1' + kiwisolver : '1.3.1' lapack : '3.8.0' - libxml2 : '2.9.1' + libxml2 : '2.9.12' llvm : '8.0.1-clang' markupsafe : '0.23' matplotlib : '3.3.4' @@ -87,7 +87,7 @@ APPLICATION : netcdf : '4.6.2' nlopt : '2.5.0' nose: '1.3.7' - numpy : '1.16.4' + numpy : '1.21.1' numpydoc : '0.9.0' omniORB : '4.2.5' omniORBpy : '4.2.5' @@ -98,7 +98,7 @@ APPLICATION : ospray : '2.4.0' packaging : '17.1' packagespy : '74152cd' - pandas : '0.25.2' + pandas : '1.1.5' patsy : '0.5.2' ParaView : {tag:'5.11.0', base: 'no', section: 'version_5_11_0_MPI', hpc: 'yes'} PERSALYS: 'v14.1' @@ -111,7 +111,7 @@ APPLICATION : pyparsing : '2.0.3' PyQt : '5.15.3' pyreadline : '2.0' - Python : '3.6.5' + Python : '3.9.14' pytz : '2017.2' qt : '5.12.10' qwt : '6.1.2' @@ -119,7 +119,7 @@ APPLICATION : rkCommon : '1.5.1' root: '6.22.02' salome_system : 'native' - scipy : '1.4.1' + scipy : '1.6.2' scotch : {tag: '6.1.2', section: 'version_6_1_2_MPI', hpc: 'yes', base: 'no'} setuptools : '38.4.0' sip : '5.5.0' @@ -223,6 +223,11 @@ __overwrite__ : { __condition__ : "VARS.dist in ['CO7']" 'APPLICATION.rm_products' : ['gcc', 'gmp', 'mpc', 'mpfr'] + 'APPLICATION.products.boost' : {tag: '1.71.0', base: 'no', section: 'version_1_71_0_CO7' } + 'APPLICATION.products.pandas' : {tag: '1.1.5', base: 'no', section: 'version_1_1_5_no_pip'} + 'APPLICATION.products.statsmodels': {tag: '0.6.1', base: 'no', section: 'version_0_6_1_no_pip' } + 'APPLICATION.products.matplotlib' : {tag: '3.3.4', base: 'no', section : 'version_3_3_5_no_pip'} + 'APPLICATION.products.mpi4py' : {tag: '3.0.3', base: 'no', section : 'version_3_0_3_no_pip'} 'APPLICATION.products.openturns' : {tag: '1.21', base: 'no', section: 'version_1_21_CO7' } } { diff --git a/products/boost.pyconf b/products/boost.pyconf index 980a86e..f340eed 100644 --- a/products/boost.pyconf +++ b/products/boost.pyconf @@ -63,6 +63,12 @@ version_1_71_0_FD36 : patches : ['boost-1.71-pthread-gcc-11.patch'] } +version_1_71_0_CO7 : +{ + compil_script : "boost-1.71.0.sh" + patches : ['boost-1.71-pthread-gcc-11.patch'] +} + version_1_58_0_DB10 : { patches : ['boost-1.58.0-python-3.7.patch'] diff --git a/products/compil_scripts/matplotlib.sh b/products/compil_scripts/matplotlib.sh index 27caae6..5e85fa6 100755 --- a/products/compil_scripts/matplotlib.sh +++ b/products/compil_scripts/matplotlib.sh @@ -7,17 +7,19 @@ echo "########################################################################## echo "*** build in SOURCE directory" -cd $SOURCE_DIR +cd $BUILD_DIR +cp -R $SOURCE_DIR/* . # we don't install in python directory -> modify environment as described in INSTALL file -mkdir -p $PRODUCT_INSTALL/lib/python${PYTHON_VERSION}/site-packages +#mkdir -p $PRODUCT_INSTALL/lib/python${PYTHON_VERSION}/site-packages export PATH=$(pwd)/bin:$PATH export PYTHONPATH=$(pwd):$PYTHONPATH export PYTHONPATH=${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION}/site-packages:$PYTHONPATH echo echo "*** build and install with $PYTHONBIN" -$PYTHONBIN setup.py install --prefix=$PRODUCT_INSTALL +#$PYTHONBIN setup.py install --prefix=$PRODUCT_INSTALL +$PYTHONBIN -m pip install --cache-dir=$BUILD_DIR/cache/pip . --no-deps --prefix=$PRODUCT_INSTALL if [ $? -ne 0 ] then echo "ERROR on build/install" diff --git a/products/compil_scripts/mpi4py.sh b/products/compil_scripts/mpi4py.sh new file mode 100755 index 0000000..c8fbcf0 --- /dev/null +++ b/products/compil_scripts/mpi4py.sh @@ -0,0 +1,31 @@ + +#!/bin/bash + +echo "##########################################################################" +echo "mpi4py" $VERSION +echo "##########################################################################" + + + +echo "*** build in SOURCE directory" +cd $BUILD_DIR +cp -R $SOURCE_DIR/* . + +# we don't install in python directory -> modify environment as described in INSTALL file +#mkdir -p $PRODUCT_INSTALL/lib/python${PYTHON_VERSION}/site-packages +export PATH=$(pwd)/bin:$PATH +export PYTHONPATH=$(pwd):$PYTHONPATH +export PYTHONPATH=${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION}/site-packages:$PYTHONPATH + +echo +echo "*** build and install with $PYTHONBIN" +#$PYTHONBIN setup.py install --prefix=$PRODUCT_INSTALL +$PYTHONBIN -m pip install --ignore-installed --cache-dir=$BUILD_DIR/cache/pip . --no-deps --prefix=$PRODUCT_INSTALL +if [ $? -ne 0 ] +then + echo "ERROR on build/install" + exit 3 +fi + +echo +echo "########## END" diff --git a/products/compil_scripts/openturns-1.21.sh b/products/compil_scripts/openturns-1.21.sh index 2ceb922..1c9b4be 100755 --- a/products/compil_scripts/openturns-1.21.sh +++ b/products/compil_scripts/openturns-1.21.sh @@ -378,11 +378,13 @@ if [[ -d "$SOURCE_DIR/otfftw-0.13" ]]; then echo "FATAL: could not install decorator-5.1.0" exit 6 fi - echo "INFO: install scikit-learn-0.24.2" - ${PYTHONBIN} -m pip install --cache-dir=$BUILD_DIR/cache/pip $SOURCE_DIR/scikit-learn-0.24.2/scikit-learn-0.24.2.tar.gz --no-deps + #echo "INFO: install scikit-learn-0.24.2" + #${PYTHONBIN} -m pip install --cache-dir=$BUILD_DIR/cache/pip $SOURCE_DIR/scikit-learn-0.24.2/scikit-learn-0.24.2.tar.gz --no-deps + echo "INFO: install scikit-learn-1.2.2" + ${PYTHONBIN} -m pip install --cache-dir=$BUILD_DIR/cache/pip $SOURCE_DIR/scikit-learn-1.2.2/scikit-learn-1.2.2.tar.gz --no-deps --prefix=$PRODUCT_INSTAL if [ $? -ne 0 ] then - echo "FATAL: could not install scikit-0.24.2" + echo "FATAL: could not install scikit-1.2.2" exit 6 fi fi @@ -435,7 +437,8 @@ if [[ -d "$SOURCE_DIR/otfftw-0.13" ]]; then # # O P E N T U R N S # - if [ -f ${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION}/site-packages/site.py ]; then + if [ -f ${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION}/site-packages/site.py ] || + [ -f ${PYTHON_ROOT_DIR}/lib/python${PYTHON_VERSION}/site.py ]; then echo "INFO: site.py already installed" elif [ "$SAT_Python_IS_NATIVE" == "1" ]; then # check first whether the init.py file is installed diff --git a/products/compil_scripts/sip-5.5.0.sh b/products/compil_scripts/sip-5.5.0.sh index 584d90d..732b9ef 100755 --- a/products/compil_scripts/sip-5.5.0.sh +++ b/products/compil_scripts/sip-5.5.0.sh @@ -12,7 +12,7 @@ cd $BUILD_DIR cp -r $SOURCE_DIR/sip-5.5.0 $BUILD_DIR/sip-5.5.0 cd $BUILD_DIR/sip-5.5.0 -USE_SETUP=true +USE_SETUP=false case $LINUX_DISTRIBUTION in CO9) USE_SETUP=false @@ -21,6 +21,9 @@ case $LINUX_DISTRIBUTION in ;; esac +$PYTHONBIN -m pip install --upgrade pip +$PYTHONBIN -m pip install --upgrade setuptools + # we don't install in python directory -> modify environment as described in INSTALL file export PATH=$(pwd)/bin:$PATH export PYTHONPATH=$(pwd):$PYTHONPATH @@ -126,5 +129,7 @@ case $LINUX_DISTRIBUTION in ;; esac +$PYTHONBIN -m + echo echo "########## END" diff --git a/products/env_scripts/mpi4py.py b/products/env_scripts/mpi4py.py index 97003e7..d40edee 100644 --- a/products/env_scripts/mpi4py.py +++ b/products/env_scripts/mpi4py.py @@ -9,6 +9,7 @@ def set_env(env, prereq_dir, version): else : versionPython = env.get('PYTHON_VERSION') env.set("MPI4PY_ROOT_DIR",os.path.join(prereq_dir, 'lib', 'python' + versionPython, 'site-packages')) + env.prepend('PYTHONPATH', os.path.join(prereq_dir, 'lib', 'python' + versionPython, 'site-packages')) def set_nativ_env(env): pass diff --git a/products/matplotlib.pyconf b/products/matplotlib.pyconf index 279b5b3..b6fc437 100755 --- a/products/matplotlib.pyconf +++ b/products/matplotlib.pyconf @@ -41,6 +41,16 @@ default_win : } } +version_3_3_5_no_pip : +{ + compil_script : "matplotlib.sh" + properties: + { + incremental : "yes" + pip : "no" + } +} + version_2_2_2 : { properties: diff --git a/products/mpi4py.pyconf b/products/mpi4py.pyconf index 4997605..7be3264 100644 --- a/products/mpi4py.pyconf +++ b/products/mpi4py.pyconf @@ -25,3 +25,13 @@ default : pip : "yes" } } + +version_3_0_3_no_pip : +{ + compil_script : "mpi4py.sh" + properties: + { + incremental : "yes" + pip : "no" + } +} diff --git a/products/opencv.pyconf b/products/opencv.pyconf index 6e4bdbb..7182981 100644 --- a/products/opencv.pyconf +++ b/products/opencv.pyconf @@ -38,7 +38,10 @@ default_win: version_3_2_0 : { - patches : ["opencv-3.2.0-ccache.patch", "SPNS-29988-opencv-3.2.0-persistence.patch", "opencv-3.2.0-python2-cmake.patch"] + patches : ["opencv-3.2.0-ccache.patch", + "SPNS-29988-opencv-3.2.0-persistence.patch", + "opencv-3.2.0-python2-cmake.patch", + "SPNS-29988-opencv-3.2.0-cv2.patch"] } version_3_2_0_FD38 : -- 2.39.2