]> SALOME platform Git repositories - tools/sat_salome.git/commitdiff
Salome HOME
spns #41854: Implement meshio for Fedora 32
authorNabil Ghodbane <nabil.ghodbane@cea.fr>
Tue, 7 May 2024 16:05:46 +0000 (18:05 +0200)
committerNabil Ghodbane <nabil.ghodbane@cea.fr>
Tue, 7 May 2024 16:05:46 +0000 (18:05 +0200)
13 files changed:
applications/SALOME-master-native.pyconf
products/compil_scripts/h5py-3.11.0.sh [new file with mode: 0755]
products/compil_scripts/meshio-5.3.5.sh [new file with mode: 0755]
products/compil_scripts/numpy-1.20.3.sh [new file with mode: 0755]
products/compil_scripts/rich-13.7.1.sh [new file with mode: 0755]
products/env_scripts/h5py.py
products/env_scripts/meshio.py [new file with mode: 0644]
products/env_scripts/rich.py [new file with mode: 0644]
products/h5py.pyconf
products/meshio.pyconf [new file with mode: 0644]
products/numpy.pyconf
products/rich.pyconf [new file with mode: 0644]
products/salome_system.pyconf

index fb89b7e4ce04f4b1554457e6661f8676d0c9a2c8..431497895f85a95674352dae54fd3ab89696f73e 100644 (file)
@@ -63,7 +63,7 @@ APPLICATION :
         gdal : 'native'
         gmsh : '4.10.3'
         graphviz : 'native'
-        h5py : '3.9.0'
+        h5py : '3.11.0'
         hdf5 : '1.10.3'
         idna : 'native'
         imagesize : 'native'
@@ -78,6 +78,7 @@ APPLICATION :
         medfile : '4.1.1'
         mesa : {tag : '19.0.8-x86_64-'+$VARS.dist, base: 'no', section: 'version_bin'}
         MeshGems : '2.15-1'
+        meshio: '5.3.5'
         metis : 'native'
         mpi4py: 'native'
         netgen : '5.3.1_with_CAS_7.2'
@@ -115,6 +116,7 @@ APPLICATION :
         qwt : 'native'
         requests : 'native'
         rkCommon : '1.5.1'
+        rich : '13.7.1'
         root: '6.22.02'
         scipy : 'native'
         scotch : {tag: '6.1.2', section: 'version_6_1_2_MPI', hpc: 'yes', base: 'no'}
@@ -311,7 +313,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'   }
+        'APPLICATION.products.numpy'            : {tag: '1.20.3', base: 'no', section: 'version_1_20_3'      }
     }
     {
         __condition__ : "VARS.dist in ['FD34']"
diff --git a/products/compil_scripts/h5py-3.11.0.sh b/products/compil_scripts/h5py-3.11.0.sh
new file mode 100755 (executable)
index 0000000..a1b0cef
--- /dev/null
@@ -0,0 +1,39 @@
+#!/bin/bash                                                                                                                                                                              
+
+echo "##########################################################################"
+echo "h5py" $VERSION
+echo "##########################################################################"
+
+LINUX_DISTRIBUTION="$DIST_NAME$DIST_VERSION"
+
+rm -rf $BUILD_DIR
+mkdir -p $BUILD_DIR/cache/pip
+
+mkdir -p $PRODUCT_INSTALL
+
+cd $BUILD_DIR
+
+export PYTHONPATH=${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION}/site-packages:$PYTHONPATH
+export PATH=${PRODUCT_INSTALL}/bin:$PATH
+
+case $LINUX_DISTRIBUTION in
+    FD32)
+        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
+            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/
+            rm -rf ${PRODUCT_INSTALL}/lib64
+        fi
+        ;;
+    *)
+        ;;
+esac
+
+echo
+echo "########## END"
diff --git a/products/compil_scripts/meshio-5.3.5.sh b/products/compil_scripts/meshio-5.3.5.sh
new file mode 100755 (executable)
index 0000000..d7cd83f
--- /dev/null
@@ -0,0 +1,37 @@
+#!/bin/bash                                                                                                                                                                              
+
+echo "##########################################################################"
+echo "meshio" $VERSION
+echo "##########################################################################"
+
+LINUX_DISTRIBUTION="$DIST_NAME$DIST_VERSION"
+
+echo "*** check installation"
+mkdir -p ${PRODUCT_INSTALL}
+rm -rf $BUILD_DIR
+mkdir -p $BUILD_DIR/cache/pip
+cd $BUILD_DIR
+
+export PYTHONPATH=${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION}/site-packages:$PYTHONPATH
+export PATH=${PRODUCT_INSTALL}/bin:$PATH
+
+case $LINUX_DISTRIBUTION in
+    FD32)
+        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'
+               )
+        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
+        ;;
+    *)
+        ;;
+esac
+
+echo
+echo "########## END"
diff --git a/products/compil_scripts/numpy-1.20.3.sh b/products/compil_scripts/numpy-1.20.3.sh
new file mode 100755 (executable)
index 0000000..05e370a
--- /dev/null
@@ -0,0 +1,65 @@
+#!/bin/bash
+
+echo "##########################################################################"
+echo "numpy" $VERSION
+echo "##########################################################################"
+
+
+mkdir -p $PRODUCT_INSTALL
+
+cd $SOURCE_DIR
+rm -f site.cfg
+
+if [ "$SAT_lapack_IS_NATIVE" != "1" ]; then
+    echo "Lapack is embedded... Make numpy aware of it..."
+    echo "[ALL]"                                             > site.cfg
+    echo "libraries = lapack,blas,cblas,lapacke,tmglib"     >> site.cfg
+    echo "library_dirs = \$\{LAPACKHOME\}/lib"              >> site.cfg
+    echo "include_dirs = \$\{LAPACKHOME\}/include"          >> site.cfg
+fi
+
+export PYTHONPATH=$SOURCE_DIR:$PYTHONPATH
+
+NUMPY_INSTALL=${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION}/site-packages
+mkdir -p ${NUMPY_INSTALL}
+PYTHONPATH=${NUMPY_INSTALL}:${PYTHONPATH}
+
+echo
+echo "*** setup.py build install"
+$PYTHONBIN setup.py build install --prefix=${PRODUCT_INSTALL} --install-lib=${NUMPY_INSTALL}
+if [ $? -ne 0 ]; then
+    echo "ERROR on setup build install"
+    rm -f site.cfg
+    exit 1
+fi
+# the embedded versioneer.py fails to retrieve the correct version - presumably because of missing .git information
+# let's fix this once for all - prevents openturns from not building.
+cd ${NUMPY_INSTALL}
+if [ -f numpy/_version.py ]; then
+    echo "INFO: ensure that version is consistently set. In principle patches "
+    sed -i "s/0+unknown/$VERSION/g" numpy/_version.py
+else
+    f=$(find . -type d -name "numpy-$VERSION-py${PYTHON_VERSION}-*x86_64.egg")
+    if [ $? -eq 0 ]; then
+             EGG_DIR=$(ls |grep numpy-$VERSION-py${PYTHON_VERSION} |grep x86_64.egg)
+             echo "INFO:  Found $EGG_DIR"
+             if [ -d $EGG_DIR/numpy ]; then
+                 ln -sf $EGG_DIR/numpy
+                 sed -i "s/0+unknown/$VERSION/g" $EGG_DIR/numpy/_version.py
+             else
+                 echo "WARNING: could not find $EGG_DIR/numpy"
+             fi
+    else
+             echo "WARNING: could not find egg directory with name: numpy-$VERSION-py${PYTHON_VERSION}-*-x86_64.egg"
+    fi
+fi
+
+if [ -d ${PRODUCT_INSTALL}/local/bin ]; then
+    mv ${PRODUCT_INSTALL}/local/bin ${PRODUCT_INSTALL}/bin
+    rm -rf ${PRODUCT_INSTALL}/local
+fi
+
+rm -f site.cfg
+echo
+echo "########## END"
+
diff --git a/products/compil_scripts/rich-13.7.1.sh b/products/compil_scripts/rich-13.7.1.sh
new file mode 100755 (executable)
index 0000000..a693922
--- /dev/null
@@ -0,0 +1,22 @@
+#!/bin/bash                                                                                                                                                                              
+
+echo "##########################################################################"
+echo "rich" $VERSION
+echo "##########################################################################"
+
+if [ ! -d $PRODUCT_INSTALL ]; then
+    mkdir -p $PRODUCT_INSTALL
+fi
+
+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
+
+echo
+echo "########## END"
index 3137f682dbcdb5cb9f60ed534d44dadca50ba7fd..ee99a7c38f607bcd8aaaf512a0764eeaa9d37832 100644 (file)
@@ -8,8 +8,7 @@ def set_env(env, prereq_dir, version):
     if not platform.system() == "Windows" :
         pyver = 'python' + env.get('PYTHON_VERSION')
         env.set('H5PY_ROOT_DIR',prereq_dir)
-        env.prepend('PYTHONPATH', os.path.join(prereq_dir, 'bin'))
-        env.prepend('PYTHONPATH', os.path.join(prereq_dir, 'lib', pyver, 'site-packages','numpy','core','include'))
+        env.prepend('PYTHONPATH', os.path.join(prereq_dir, 'lib', pyver, 'site-packages'))
 
 def set_nativ_env(env):
     pass
diff --git a/products/env_scripts/meshio.py b/products/env_scripts/meshio.py
new file mode 100644 (file)
index 0000000..b833d27
--- /dev/null
@@ -0,0 +1,16 @@
+#!/usr/bin/env python
+#-*- coding:utf-8 -*-
+
+import os.path
+import platform
+
+def set_env(env, prereq_dir, version):
+    if not platform.system() == "Windows" :
+        pyver = 'python' + env.get('PYTHON_VERSION')
+        env.set('MESHIO_ROOT_DIR',prereq_dir)
+        env.set('HDF5_DISABLE_VERSION_CHECK', '1')
+        env.prepend('PATH', os.path.join(prereq_dir, 'bin'))
+        env.prepend('PYTHONPATH', os.path.join(prereq_dir, 'lib', pyver, 'site-packages'))
+
+def set_nativ_env(env):
+    pass
diff --git a/products/env_scripts/rich.py b/products/env_scripts/rich.py
new file mode 100644 (file)
index 0000000..f9d2878
--- /dev/null
@@ -0,0 +1,15 @@
+#!/usr/bin/env python
+#-*- coding:utf-8 -*-
+
+import os.path
+import platform
+
+def set_env(env, prereq_dir, version):
+    if not platform.system() == "Windows" :
+        pyver = 'python' + env.get('PYTHON_VERSION')
+        env.set('RICH_ROOT_DIR',prereq_dir)
+        env.prepend('PATH', os.path.join(prereq_dir, 'bin'))
+        env.prepend('PYTHONPATH', os.path.join(prereq_dir, 'lib', pyver, 'site-packages'))
+
+def set_nativ_env(env):
+    pass
index 518e08da6d547796599889b276c79db858b634ae..c6c99b7e52c9875d0607b21e7dec72b70076c861 100644 (file)
@@ -28,13 +28,13 @@ default :
     }
 }
 
-version_3_9_0:
+version_3_11_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']
+   compil_script: "h5py-3.11.0"  + $VARS.scriptExtension
+   archive_info : {archive_name : "h5py-3.11.0-x86_64.tar.gz"}
+   properties :
+   {
+     incremental : "yes"
+     pip : "no"
+   }
 }
diff --git a/products/meshio.pyconf b/products/meshio.pyconf
new file mode 100644 (file)
index 0000000..d041f49
--- /dev/null
@@ -0,0 +1,39 @@
+default :
+{
+    name : "meshio"
+    build_source : "script"
+    compil_script: "meshio"  + $VARS.scriptExtension
+    get_source : "archive"
+    patches : []
+    system_info : 
+    {
+        rpm : []
+        rpm_dev : []
+        apt : []
+        apt_dev : []
+    }
+    environ :
+    {
+       env_script : $name + ".py"
+    }
+    depend : ['Python', 'numpy', 'hdf5', 'h5py', 'netcdf', 'rich']
+    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"
+    }
+}
+
+version_5_3_5 :
+{
+   compil_script: "meshio-5.3.5"  + $VARS.scriptExtension
+   archive_info : {archive_name : "meshio-5.3.5-x86_64.tar.gz"}
+   properties :
+   {
+     incremental : "yes"
+     pip : "no"
+   }
+}
index d8d9a08945acf8bc454b19dacb3c063edc220e9a..4e642f93e0cc29e02b8837a074de1f0d6e383709 100755 (executable)
@@ -72,6 +72,17 @@ version_1_21_6_win_dbg:
     }
 }
 
+version_1_20_3:
+{
+    properties:
+    {
+      incremental : "yes"
+      pip : "no"
+    }
+    compil_script : "numpy-1.20.3.sh"
+#    patches: ['SPNS-29988-numpy-1.22.patch']
+}
+
 version_1_16_4_win_dbg:
 {
     name : "numpy"
diff --git a/products/rich.pyconf b/products/rich.pyconf
new file mode 100644 (file)
index 0000000..f1b5b83
--- /dev/null
@@ -0,0 +1,40 @@
+default :
+{
+    name : "rich"
+    build_source : "script"
+    compil_script: "rich"  + $VARS.scriptExtension
+    get_source : "archive"
+    patches : []
+    system_info : 
+    {
+        rpm : ['python3-rich']
+        rpm_dev : ['python3-rich']
+        apt : ['python3-rich']
+        apt_dev : ['python3-rich']
+    }
+    environ :
+    {
+       env_script : $name + ".py"
+    }
+    depend : ['Python', 'numpy', 'hdf5', 'h5py']
+    opt_depend: ['openmpi']
+    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"
+    }
+}
+
+version_13_7_1:
+{
+    compil_script: "rich-13.7.1"  + $VARS.scriptExtension
+    properties :
+    {
+      incremental : "yes"
+      pip : "no"
+    }
+}
+
index 7cf4ccd55ebdc78574610ef50be06cd10358a26c..f6a8f3298721be44cdc43cfb6ca6e4b44cab7b06 100644 (file)
@@ -52,7 +52,7 @@ default :
         }
         "FD32" :
         {
-           rpm : ["lz4", "gsl", "openmpi", "netcdf", "gdal", "libxml++"]
+           rpm : ["lz4", "gsl", "openmpi", "netcdf", "python3-netcdf4", "gdal", "libxml++"]
            rpm_dev : ["perl-interpreter", "qt5-devel", "gsl-devel", "openmpi-devel", "netcdf-devel", "protobuf-devel", "python3-protobuf", "texlive-dvipng", "libxml++-devel"]
         }
         "FD34" :