From 5dc3aeeddd685fdf4e2065f772b17bfea5ebab83 Mon Sep 17 00:00:00 2001 From: Nabil Ghodbane Date: Tue, 7 May 2024 14:16:07 +0200 Subject: [PATCH] spns #41854: add h5py - tested on FD32 --- applications/SALOME-master-native.pyconf | 2 ++ products/compil_scripts/h5py-3.9.0.sh | 29 ++++++++++++++++++++++++ products/h5py.pyconf | 11 +++++++++ products/patches/h5py-3.9.0.p01.patch | 11 +++++++++ 4 files changed, 53 insertions(+) create mode 100755 products/compil_scripts/h5py-3.9.0.sh create mode 100644 products/patches/h5py-3.9.0.p01.patch diff --git a/applications/SALOME-master-native.pyconf b/applications/SALOME-master-native.pyconf index 001a1b3..fb89b7e 100644 --- a/applications/SALOME-master-native.pyconf +++ b/applications/SALOME-master-native.pyconf @@ -63,6 +63,7 @@ APPLICATION : gdal : 'native' gmsh : '4.10.3' graphviz : 'native' + h5py : '3.9.0' hdf5 : '1.10.3' idna : 'native' imagesize : 'native' @@ -310,6 +311,7 @@ __overwrite__ : 'APPLICATION.products.PyFMI' : {tag: '2.6', base: 'no', section: 'version_2_6_no_pip' } 'APPLICATION.products.Sphinx' : {tag: '1.7.6', base: 'no', section: 'version_1_7_6_no_pip' } 'APPLICATION.products.gdal' : {tag:'2.4.0', base: 'no', section: 'version_2_4_0_FD32' } # spns #29324 + 'APPLICATION.products.h5py' : {tag:'3.9.0', base: 'no', section: 'version_3_9_0_FD32' } } { __condition__ : "VARS.dist in ['FD34']" diff --git a/products/compil_scripts/h5py-3.9.0.sh b/products/compil_scripts/h5py-3.9.0.sh new file mode 100755 index 0000000..6271dc7 --- /dev/null +++ b/products/compil_scripts/h5py-3.9.0.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +echo "##########################################################################" +echo "h5py" $VERSION +echo "##########################################################################" + +rm -rf $BUILD_DIR +cp -r $SOURCE_DIR $BUILD_DIR + +mkdir -p ${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION}/site-packages +export PYTHONPATH=${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION}/site-packages:${PYTHONPATH} +mkdir -p $PRODUCT_INSTALL +echo + +cd $BUILD_DIR + +echo "*** setup.py BUILD" +python setup.py build + +echo "*** setup.py INSTALL" +python setup.py install --prefix=${PRODUCT_INSTALL} --install-lib ${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION}/site-packages +if [ $? -ne 0 ]; then + echo "ERROR on setup" + exit 3 +fi + +echo +echo "########## END" + diff --git a/products/h5py.pyconf b/products/h5py.pyconf index c9fdd6e..518e08d 100644 --- a/products/h5py.pyconf +++ b/products/h5py.pyconf @@ -27,3 +27,14 @@ default : pip : "no" } } + +version_3_9_0: +{ + compil_script: "h5py-3.9.0" + $VARS.scriptExtension +} + +version_3_9_0_FD32: +{ + compil_script: "h5py-3.9.0" + $VARS.scriptExtension + patches : ['h5py-3.9.0.p01.patch'] +} diff --git a/products/patches/h5py-3.9.0.p01.patch b/products/patches/h5py-3.9.0.p01.patch new file mode 100644 index 0000000..939163d --- /dev/null +++ b/products/patches/h5py-3.9.0.p01.patch @@ -0,0 +1,11 @@ +--- h5py-3.9.0_ref/h5py/_errors.pyx 2023-04-26 17:08:31.000000000 +0200 ++++ h5py-3.9.0_dev/h5py/_errors.pyx 2024-05-05 14:40:30.886340118 +0200 +@@ -94,7 +94,7 @@ + H5E_error_t err + int n + +-cdef herr_t walk_cb(unsigned int n, const H5E_error_t *desc, void *e) nogil noexcept: ++cdef herr_t walk_cb(unsigned int n, const H5E_error_t *desc, void *e) nogil: + + cdef err_data_t *ee = e + -- 2.39.2