From 72242e39675753ad01732511382fc768d81ae0b8 Mon Sep 17 00:00:00 2001 From: Nabil Ghodbane Date: Thu, 9 May 2024 12:12:39 +0200 Subject: [PATCH] spns #41854: Implement UB20.04 --- applications/SALOME-master-native.pyconf | 1 + products/compil_scripts/h5py-3.11.0.sh | 2 +- products/compil_scripts/meshio-5.3.5.sh | 2 +- products/compil_scripts/rich-13.7.1.sh | 24 +++++++++++++++++++----- products/netCDF4.pyconf | 4 ++-- products/numpy.pyconf | 2 +- products/patches/numpy-1.20.3.pO1.patch | 11 +++++++++++ products/patches/numpy-1.20.3.pO2.patch | 11 +++++++++++ products/patches/numpy-1.20.3.pO3.patch | 11 +++++++++++ products/rich.pyconf | 4 ++++ products/salome_system.pyconf | 2 +- 11 files changed, 63 insertions(+), 11 deletions(-) create mode 100644 products/patches/numpy-1.20.3.pO1.patch create mode 100644 products/patches/numpy-1.20.3.pO2.patch create mode 100644 products/patches/numpy-1.20.3.pO3.patch diff --git a/applications/SALOME-master-native.pyconf b/applications/SALOME-master-native.pyconf index 4314978..e9c91a2 100644 --- a/applications/SALOME-master-native.pyconf +++ b/applications/SALOME-master-native.pyconf @@ -217,6 +217,7 @@ __overwrite__ : 'APPLICATION.products.netcdf' : '4.6.2' 'APPLICATION.products.PyFMI' : {tag: '2.6', base: 'no', section: 'version_2_6_no_pip' } 'APPLICATION.products.scipy' : {tag: '1.5.2', base: 'no', section: 'version_1_5_2_no_pip' } # scipy >= 1.4 - system one too old + 'APPLICATION.products.numpy' : {tag: '1.20.3', base: 'no', section: 'version_1_20_3' } } { # diff --git a/products/compil_scripts/h5py-3.11.0.sh b/products/compil_scripts/h5py-3.11.0.sh index 57fe56b..492ae65 100755 --- a/products/compil_scripts/h5py-3.11.0.sh +++ b/products/compil_scripts/h5py-3.11.0.sh @@ -17,7 +17,7 @@ export PYTHONPATH=${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION}/site-packages:$ export PATH=${PRODUCT_INSTALL}/bin:$PATH case $LINUX_DISTRIBUTION in - FD32) + FD32|UB20*) WHEELS=('h5py-3.11.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl') for WHEEL in "${WHEELS[@]}"; do ${PYTHONBIN} -m pip install --cache-dir=$BUILD_DIR/cache/pip $SOURCE_DIR/$WHEEL --no-deps --prefix=$PRODUCT_INSTALL diff --git a/products/compil_scripts/meshio-5.3.5.sh b/products/compil_scripts/meshio-5.3.5.sh index d7cd83f..0969028 100755 --- a/products/compil_scripts/meshio-5.3.5.sh +++ b/products/compil_scripts/meshio-5.3.5.sh @@ -16,7 +16,7 @@ export PYTHONPATH=${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION}/site-packages:$ export PATH=${PRODUCT_INSTALL}/bin:$PATH case $LINUX_DISTRIBUTION in - FD32) + FD32|UB20*) WHEELS=('markdown_it_py-3.0.0-py3-none-any.whl' 'typing_extensions-4.11.0-py3-none-any.whl' 'meshio-5.3.5-py3-none-any.whl' diff --git a/products/compil_scripts/rich-13.7.1.sh b/products/compil_scripts/rich-13.7.1.sh index a693922..ec19992 100755 --- a/products/compil_scripts/rich-13.7.1.sh +++ b/products/compil_scripts/rich-13.7.1.sh @@ -4,6 +4,8 @@ echo "########################################################################## echo "rich" $VERSION echo "##########################################################################" +LINUX_DISTRIBUTION="$DIST_NAME$DIST_VERSION" + if [ ! -d $PRODUCT_INSTALL ]; then mkdir -p $PRODUCT_INSTALL fi @@ -12,11 +14,23 @@ rm -rf $BUILD_DIR mkdir -p $BUILD_DIR/cache/pip cd $BUILD_DIR -${PYTHONBIN} -m pip install --cache-dir=$BUILD_DIR/cache/pip $SOURCE_DIR/rich-13.7.1-py3-none-any.whl --no-deps --prefix=$PRODUCT_INSTALL -if [ $? -ne 0 ]; then - echo "FATAL: could not install rich 13.7.1" - exit 1 -fi +case $LINUX_DISTRIBUTION in + FD32|UB20*) + WHEELS=('rich-13.7.1-py3-none-any.whl') + for WHEEL in "${WHEELS[@]}"; do + ${PYTHONBIN} -m pip install --cache-dir=$BUILD_DIR/cache/pip $SOURCE_DIR/$WHEEL --no-deps --prefix=$PRODUCT_INSTALL + if [ $? -ne 0 ]; then + echo "ERROR: could not install $WHEEL" + exit 1 + fi + done + if [ -d ${PRODUCT_INSTALL}/lib64 ]; then + mv ${PRODUCT_INSTALL}/lib64 ${PRODUCT_INSTALL}/lib + fi + ;; + *) + ;; +esac echo echo "########## END" diff --git a/products/netCDF4.pyconf b/products/netCDF4.pyconf index 6488b6f..e260759 100644 --- a/products/netCDF4.pyconf +++ b/products/netCDF4.pyconf @@ -7,9 +7,9 @@ default : patches : [] system_info : { - rpm : [] + rpm : ['python3-netcdf4'] rpm_dev : [] - apt : [] + apt : ['python3-netcdf4'] apt_dev : [] } environ : diff --git a/products/numpy.pyconf b/products/numpy.pyconf index 4e642f9..a2786e0 100755 --- a/products/numpy.pyconf +++ b/products/numpy.pyconf @@ -80,7 +80,7 @@ version_1_20_3: pip : "no" } compil_script : "numpy-1.20.3.sh" -# patches: ['SPNS-29988-numpy-1.22.patch'] + patches: ['numpy-1.20.3.pO1.patch', 'numpy-1.20.3.pO2.patch', 'numpy-1.20.3.pO3.patch'] } version_1_16_4_win_dbg: diff --git a/products/patches/numpy-1.20.3.pO1.patch b/products/patches/numpy-1.20.3.pO1.patch new file mode 100644 index 0000000..b10d8f4 --- /dev/null +++ b/products/patches/numpy-1.20.3.pO1.patch @@ -0,0 +1,11 @@ +--- numpy-1.20.3_ref/pyproject.toml 2021-05-09 12:38:00.000000000 +0200 ++++ numpy-1.20.3_dev/pyproject.toml 2024-05-09 11:50:44.909893215 +0200 +@@ -3,7 +3,7 @@ + requires = [ + "setuptools<49.2.0", + "wheel<=0.35.1", +- "Cython>=0.29.21,<3.0", # Note: keep in sync with tools/cythonize.py ++ "Cython>=0.29.0,<3.0", # Note: keep in sync with tools/cythonize.py + ] + + diff --git a/products/patches/numpy-1.20.3.pO2.patch b/products/patches/numpy-1.20.3.pO2.patch new file mode 100644 index 0000000..bea9616 --- /dev/null +++ b/products/patches/numpy-1.20.3.pO2.patch @@ -0,0 +1,11 @@ +--- numpy-1.20.3_ref/tools/cythonize.py 2021-05-09 12:38:00.000000000 +0200 ++++ numpy-1.20.3_dev/tools/cythonize.py 2024-05-09 11:49:05.948073244 +0200 +@@ -70,7 +70,7 @@ + # other fixes in the 0.29 series that are needed even for earlier + # Python versions. + # Note: keep in sync with that in pyproject.toml +- required_version = LooseVersion('0.29.21') ++ required_version = LooseVersion('0.29.0') + + if LooseVersion(cython_version) < required_version: + raise RuntimeError(f'Building {VENDOR} requires Cython >= {required_version}') diff --git a/products/patches/numpy-1.20.3.pO3.patch b/products/patches/numpy-1.20.3.pO3.patch new file mode 100644 index 0000000..f6ba88d --- /dev/null +++ b/products/patches/numpy-1.20.3.pO3.patch @@ -0,0 +1,11 @@ +--- numpy-1.20.3_ref/numpy/core/tests/test_cython.py 2021-05-08 20:35:28.000000000 +0200 ++++ numpy-1.20.3_dev/numpy/core/tests/test_cython.py 2024-05-09 11:49:05.796070449 +0200 +@@ -19,7 +19,7 @@ + # other fixes in the 0.29 series that are needed even for earlier + # Python versions. + # Note: keep in sync with the one in pyproject.toml +- required_version = LooseVersion("0.29.21") ++ required_version = LooseVersion("0.29.0") + if LooseVersion(cython_version) < required_version: + # too old or wrong cython, skip the test + cython = None diff --git a/products/rich.pyconf b/products/rich.pyconf index c48960d..5e2242f 100644 --- a/products/rich.pyconf +++ b/products/rich.pyconf @@ -30,6 +30,10 @@ default : version_13_7_1: { + archive_info : + { + archive_name : "rich-13.7.1-x86_64.tar.gz" + } compil_script: "rich-13.7.1" + $VARS.scriptExtension properties : { diff --git a/products/salome_system.pyconf b/products/salome_system.pyconf index f6a8f32..de6c047 100644 --- a/products/salome_system.pyconf +++ b/products/salome_system.pyconf @@ -128,7 +128,7 @@ default : { apt : ["libdc1394-22", "libopenexr24", "libwebp6", "libgfortran5", "libilmbase24", "libevent-2.1-7", "libpng16-16", "libgcc-9-dev", "libffi7", "libtinfo6", "libgphoto2-port12", "libglx0", "libopengl0", "libzstd1", "libglvnd0", "openmpi-bin", "libgdal26", "libopenblas0-serial", "libtbb2", - "libxml++2.6-2v5"] + "libxml++2.6-2v5", "python3-netcdf4"] apt_dev : ["libtbb-dev", "cython3", "libfftw3-dev", "libopenblas-dev", "qttools5-dev", "libqt5svg5-dev", "libqt5x11extras5-dev", "qtxmlpatterns5-dev-tools", "libopenmpi-dev", "libpng-dev", "libtiff5-dev", "libgeotiff-dev", "libjpeg-dev", "libgif-dev", "libgeos-dev", "libsqlite3-dev", "libgdal-dev", "dvipng", "libxml++2.6-dev"] -- 2.39.2