From: Nabil Ghodbane Date: Tue, 7 Nov 2023 15:09:47 +0000 (+0100) Subject: spns #38555: add h5py SAT configuration file X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0e8202ea6588f4badfaf87225f9e10c05cdecce0;p=tools%2Fsat_salome.git spns #38555: add h5py SAT configuration file --- diff --git a/products/compil_scripts/h5py.sh b/products/compil_scripts/h5py.sh new file mode 100755 index 0000000..c38b221 --- /dev/null +++ b/products/compil_scripts/h5py.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +echo "##########################################################################" +echo "openturns" $VERSION +echo "##########################################################################" + +# we don't install in python directory -> modify environment as described in INSTALL file + +#mkdir -p $PRODUCT_INSTALL/lib/python${PYTHON_VERSION}/site-packages +rm -rf $BUILD_DIR +cp -r $SOURCE_DIR $BUILD_DIR +mkdir -p $BUILD_DIR/cache/pip +cd $BUILD_DIR +$PYTHONBIN setup.py build +if [ $? -ne 0 ] +then + echo "ERROR on ${PYTHONBIN} setup.py build" + exit 4 +fi +# + +$PYTHONBIN setup.py install --prefix=$PRODUCT_INSTALL +if [ $? -ne 0 ] +then + echo "ERROR on ${PYTHONBIN} setup.py install --prefix=$PRODUCT_INSTALL" + exit 5 +fi diff --git a/products/env_scripts/h5py.py b/products/env_scripts/h5py.py new file mode 100644 index 0000000..3137f68 --- /dev/null +++ b/products/env_scripts/h5py.py @@ -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('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')) + +def set_nativ_env(env): + pass diff --git a/products/h5py.pyconf b/products/h5py.pyconf new file mode 100644 index 0000000..c9fdd6e --- /dev/null +++ b/products/h5py.pyconf @@ -0,0 +1,29 @@ +default : +{ + name : "h5py" + build_source : "script" + compil_script: "h5py.sh" + get_source : "archive" + patches : [] + system_info : + { + rpm : ["h5py"] + rpm_dev : [] + apt : ["python3-h5py"] + apt_dev : [] + } + environ : + { + env_script : $name + ".py" + } + depend : ['Python', 'numpy', 'hdf5'] + 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 : "no" + } +}