From 6665b24963d9be52b8d72cf233f1554c9db25fde Mon Sep 17 00:00:00 2001 From: Nabil Ghodbane Date: Sat, 26 Feb 2022 23:04:55 +0100 Subject: [PATCH] spns #26828: convergence EDF: netcdf, nose, zeromq, PERSALYS --- applications/SALOME-master.pyconf | 5 ++ products/PERSALYS.pyconf | 61 +++++++++++++ products/compil_scripts/PERSALYS-v11.0.sh | 101 ++++++++++++++++++++++ products/compil_scripts/ParaView-5.9.0.sh | 2 +- products/compil_scripts/gdal-2.4.0.sh | 42 ++++++++- products/compil_scripts/zeromq-4.3.1.sh | 82 ++++++++++++++++++ products/env_scripts/PERSALYS.py | 17 ++++ products/env_scripts/Sphinx.py | 2 + products/env_scripts/gdal.py | 1 + products/env_scripts/nose.py | 14 +++ products/env_scripts/openturns.py | 1 + products/env_scripts/qwt.py | 1 - products/env_scripts/zeromq.py | 12 +++ products/netcdf.pyconf | 1 + products/nose.pyconf | 31 +++++++ products/patches/PERSALYS-v11-001.patch | 27 ++++++ products/patches/netcdf-4.6.2-001.patch | 11 +++ products/zeromq.pyconf | 42 +++++++++ 18 files changed, 447 insertions(+), 6 deletions(-) create mode 100644 products/PERSALYS.pyconf create mode 100755 products/compil_scripts/PERSALYS-v11.0.sh create mode 100755 products/compil_scripts/zeromq-4.3.1.sh create mode 100644 products/env_scripts/PERSALYS.py create mode 100644 products/env_scripts/nose.py create mode 100644 products/env_scripts/zeromq.py create mode 100644 products/nose.pyconf create mode 100644 products/patches/PERSALYS-v11-001.patch create mode 100644 products/patches/netcdf-4.6.2-001.patch create mode 100644 products/zeromq.pyconf diff --git a/applications/SALOME-master.pyconf b/applications/SALOME-master.pyconf index 34fee6f..a3c610d 100644 --- a/applications/SALOME-master.pyconf +++ b/applications/SALOME-master.pyconf @@ -55,6 +55,7 @@ APPLICATION : mpi4py: '3.0.3' gmp : 'native' mpfr : 'native' + #gdal : '2.4.0' gmsh : '4.8.4' graphviz : '2.38.0' hdf5 : '1.10.3' @@ -73,7 +74,9 @@ APPLICATION : MeshGems : '2.14-1' metis : '5.1.0' netgen : '6.2.2101' + #netcdf : '4.6.2' nlopt : '2.5.0' + #nose: '1.3.7' numpy : '1.16.4' omniORB : '4.2.2' omniORBpy : '4.2.2' @@ -86,6 +89,7 @@ APPLICATION : pandas : '0.25.2' patsy : '0.5.2' ParaView : '5.9.0' + #PERSALYS: 'v11.0' petsc : {tag : '3.16.0', section: 'version_3_16_0'} Pillow : '7.1.1' planegcs : '0.18-3cb6890' @@ -122,6 +126,7 @@ APPLICATION : tk : '8.6.0' TopIIVolMesh: 'develop' urllib3 : '1.23' + #zeromq: '4.3.1' URANIE : '4.5.0' # SALOME MODULES : 'CONFIGURATION' diff --git a/products/PERSALYS.pyconf b/products/PERSALYS.pyconf new file mode 100644 index 0000000..b9624d6 --- /dev/null +++ b/products/PERSALYS.pyconf @@ -0,0 +1,61 @@ +default : +{ + name : "PERSALYS" + build_source : "script" + compil_script : $name + "-" + $APPLICATION.products.PERSALYS + $VARS.scriptExtension + get_source : "archive" + archive_info : + { + archive_name : "persalys_" + $APPLICATION.products.PERSALYS + ".tar.gz" + } + environ : + { + env_script : $name + ".py" + } + depend : ['Python', + 'lapack', + 'hdf5', + 'tbb', + 'nlopt', + 'libxml2', + 'eigen', + 'netcdf', + 'gdal', + 'ADAO', + 'boost', + 'KERNEL', + 'GUI', + 'Sphinx', + 'qwt', + 'YACS', + 'YDEFX', + 'CAS', + 'CONFIGURATION' + ] + build_depend : ["cmake", "swig"] + opt_depend : ['openmpi', 'openturns'] + patches : [] + source_dir : $APPLICATION.workdir + $VARS.sep + 'SOURCES' + $VARS.sep + $name + build_dir : $APPLICATION.workdir + $VARS.sep + 'BUILD' + $VARS.sep + $name + install_dir : 'base' + properties : + { + single_install_dir : "no" + incremental : "yes" + } +} + +default_win : +{ + properties : + { + single_install_dir : "yes" + } + depend : ['Python', 'lapack', 'hdf5', 'tbb', 'nlopt', 'libxml2', 'eigen', 'pthreads', 'netcdf', 'gdal'] + opt_depend : [] +} + +version_v11_0 : +{ + patches : ['PERSALYS-v11-001.patch'] +} diff --git a/products/compil_scripts/PERSALYS-v11.0.sh b/products/compil_scripts/PERSALYS-v11.0.sh new file mode 100755 index 0000000..8a35b5a --- /dev/null +++ b/products/compil_scripts/PERSALYS-v11.0.sh @@ -0,0 +1,101 @@ +#!/bin/bash + +echo "##########################################################################" +echo "PERSALYS" $VERSION +echo "##########################################################################" + +if [ -n "$MPI_ROOT_DIR" ] +then + echo "WARNING: setting CC and CXX environment variables and target MPI wrapper" + export CC=${MPI_ROOT_DIR}/bin/mpicc + export CXX=${MPI_ROOT_DIR}/bin/mpicxx +fi + +CMAKE_OPTIONS="" +CMAKE_OPTIONS+=" -DCMAKE_INSTALL_PREFIX:STRING=$PRODUCT_INSTALL" +CMAKE_OPTIONS+=" -DADAO_ROOT_DIR=$ADAO_ROOT_DIR" +CMAKE_OPTIONS+=" -DADAO_INTERFACE_ROOT_DIR=$ADAO_INTERFACE_ROOT_DIR" +#CMAKE_OPTIONS+=" -DBOOST_ROOT:PATH=${BOOST_ROOT_DIR}" +CMAKE_OPTIONS+=" -DGUI_ROOT_DIR=$GUI_ROOT_DIR" +CMAKE_OPTIONS+=" -DKERNEL_ROOT_DIR=$KERNEL_ROOT_DIR" +CMAKE_OPTIONS+=" -DOpenTURNS_DIR=$OPENTURNS_ROOT_DIR" +CMAKE_OPTIONS+=" -DPY2CPP_ROOT_DIR=$PY2CPP_ROOT_DIR" +CMAKE_OPTIONS+=" -DPYTHON_ROOT_DIR=$PYTHON_ROOT_DIR" +CMAKE_OPTIONS+=" -DQWT_ROOT_DIR=$QWT_ROOT_DIR" +#!/bin/bash + +echo "##########################################################################" +echo "PERSALYS" $VERSION +echo "##########################################################################" + +if [ -n "$MPI_ROOT_DIR" ] +then + echo "WARNING: setting CC and CXX environment variables and target MPI wrapper" + export CC=${MPI_ROOT_DIR}/bin/mpicc + export CXX=${MPI_ROOT_DIR}/bin/mpicxx +fi + +CMAKE_OPTIONS="" +CMAKE_OPTIONS+=" -DCMAKE_INSTALL_PREFIX:STRING=$PRODUCT_INSTALL" +CMAKE_OPTIONS+=" -DADAO_ROOT_DIR=$ADAO_ROOT_DIR" +CMAKE_OPTIONS+=" -DADAO_INTERFACE_ROOT_DIR=$ADAO_INTERFACE_ROOT_DIR" +CMAKE_OPTIONS+=" -DBOOST_ROOT:PATH=${BOOST_ROOT_DIR}" +CMAKE_OPTIONS+=" -DGUI_ROOT_DIR=$GUI_ROOT_DIR" +CMAKE_OPTIONS+=" -DKERNEL_ROOT_DIR=$KERNEL_ROOT_DIR" +CMAKE_OPTIONS+=" -DOpenTURNS_DIR=$OPENTURNS_ROOT_DIR" +CMAKE_OPTIONS+=" -DPY2CPP_ROOT_DIR=$PY2CPP_ROOT_DIR" +CMAKE_OPTIONS+=" -DPYTHON_ROOT_DIR=$PYTHON_ROOT_DIR" +CMAKE_OPTIONS+=" -DQWT_LIBRARY=$QWT_ROOT_DIR/lib/libqwt.so" +CMAKE_OPTIONS+=" -DQWT_INCLUDE_DIR=$QWT_ROOT_DIR/include" +CMAKE_OPTIONS+=" -DSPHINX_ROOT_DIR=$SPHINX_ROOT_DIR" +CMAKE_OPTIONS+=" -DYACS_ROOT_DIR=$YACS_ROOT_DIR" +CMAKE_OPTIONS+=" -DYDEFX_ROOT_DIR=$YDEFX_ROOT_DIR" +CMAKE_OPTIONS+=" -DAdaoCppLayer_INCLUDE_DIR=$ADAO_INTERFACE_ROOT_DIR/include" +CMAKE_OPTIONS+=" -DAdaoCppLayer_ROOT_DIR=$ADAO_INTERFACE_ROOT_DIR" +CMAKE_OPTIONS+=" -DUSE_SALOME=ON" +CMAKE_OPTIONS+=" -DGDAL_LIBRARY=$GDALHOME/lib/libgdal.so" +CMAKE_OPTIONS+=" -DGDAL_INCLUDE_DIR=$GDALHOME/include" +CMAKE_OPTIONS+=" -DTBB_ROOT=$TBB_ROOT_DIR" +CMAKE_OPTIONS+=" -DTBB_INCLUDE_DIR=$TBB_ROOT_DIR/include" +CMAKE_OPTIONS+=" -DMPI_C_FOUND=$MPI_C_FOUND" +CMAKE_OPTIONS+=" -DPYTHON_EXECUTABLE=$PYTHONBIN" +CMAKE_OPTIONS+=" -DOTGUI_PYTHON_VERSION=$PYTHON_VERSION" +CMAKE_OPTIONS+=" -DPYTHON_INCLUDE_DIR=$PYTHON_INCLUDE" +CMAKE_OPTIONS+=" -DPYTHON_LIBRARY=$PYTHON_ROOT_DIR/lib/libpython$PYTHON_VERSION.so" +CMAKE_OPTIONS+=" -DCAS_ROOT_DIR=$CAS_ROOT_DIR" +CMAKE_OPTIONS+=" -DSPHINX_ROOT_DIR:FILEPATH=$SPHINX_ROOT_DIR" +CMAKE_OPTIONS+=" -DSPHINX_EXECUTABLE:FILEPATH=${SPHINX_ROOT_DIR}/bin/sphinx-build" +CMAKE_OPTIONS+=" -DCMAKE_FIND_ROOT_PATH=ON" +CMAKE_OPTIONS+=" -DSWIG_EXECUTABLE:PATH=$(which swig)" +CMAKE_OPTIONS+=" -DCMAKE_PREFIX_PATH=\"$GUI_ROOT_DIR/adm_local/cmake_files;$KERNEL_ROOT_DIR/salome_adm/cmake_files;$OPENTURNS_HOME/lib/cmake/openturns;$PY2CPP_ROOT_DIR/lib/cmake/py2cpp/;$QWT_ROOT_DIR;$YACS_ROOT_DIR/adm/cmake;$YDEFX_ROOT_DIR/salome_adm/cmake_files;\"" + +echo +echo "*** cmake" $CMAKE_OPTIONS +cmake $CMAKE_OPTIONS $SOURCE_DIR +if [ $? -ne 0 ] +then + echo "ERROR on cmake" + exit 1 +fi + +echo +echo "*** make" $MAKE_OPTIONS +make $MAKE_OPTIONS +if [ $? -ne 0 ] +then + echo "ERROR on make" + exit 2 +fi + +echo +echo "*** make install" +make install +if [ $? -ne 0 ] +then + echo "ERROR on make install" + exit 3 +fi + +echo +echo "########## END" + diff --git a/products/compil_scripts/ParaView-5.9.0.sh b/products/compil_scripts/ParaView-5.9.0.sh index db729b8..687ea71 100755 --- a/products/compil_scripts/ParaView-5.9.0.sh +++ b/products/compil_scripts/ParaView-5.9.0.sh @@ -36,7 +36,7 @@ then EGL_FOUND=false LINUX_DISTRIBUTION="$DIST_NAME$DIST_VERSION" case $LINUX_DISTRIBUTION in - CO6|CO7|FD26|FD30|FD32|FD34) + CO*||FD*) if [ -f /usr/include/EGL/egl.h ] && [ -f /usr/lib64/libEGL.so ] && [ -f /usr/lib64/libOpenGL.so ] then EGL_FOUND=true diff --git a/products/compil_scripts/gdal-2.4.0.sh b/products/compil_scripts/gdal-2.4.0.sh index e95e566..9147a98 100755 --- a/products/compil_scripts/gdal-2.4.0.sh +++ b/products/compil_scripts/gdal-2.4.0.sh @@ -11,13 +11,47 @@ CONFIGURE_FLAGS+=" --with-xml2=${LIBXML_ROOT_DIR}" CONFIGURE_FLAGS+=" --with-hdf5=${HDF5_ROOT_DIR}" CONFIGURE_FLAGS+=" --with-netcdf=${NETCDF_ROOT_DIR}" +./configure --prefix=$CURRENT_SOFTWARE_INSTALL_DIR +LDFLAGS= +LDFLAGS+=" -L${HDF5_ROOT_DIR}/lib/ -lhdf5 -L${HDF5_ROOT_DIR}/lib/libhdf5_hl.so -lhdf5_hl" +LDFLAGS+=" -L${NETCDF_ROOT_DIR}/lib -lnetcdf" + +HDF5_CFLAGS= +HDF5_CFLAGS+=" -I${HDF5_ROOT_DIR}/include -L${HDF5_ROOT_DIR}/lib/ -lhdf5" +HDF5_CFLAGS+=" -L${HDF5_ROOT_DIR}/lib/libhdf5_hl.so -lhdf5_hl" + +LIBS= +LIBS+=" -L${HDF5_ROOT_DIR}/lib/ -lhdf5 -L${HDF5_ROOT_DIR}/lib/libhdf5_hl.so -lhdf5_hl" +LIBS+=" -L${NETCDF_ROOT_DIR}/lib -lnetcdf" + +HDF5_LIBS="-L${HDF5_ROOT_DIR}/lib/ -lhdf5 -L${HDF5_ROOT_DIR}/lib/libhdf5_hl.so -lhdf5_hl" +HDF5_INCLUDE="-I${HDF5_ROOT_DIR}/include" + +CONFIGURE_FLAGS= +#CONFIGURE_FLAGS+=" LDFLAGS=\"$LDFLAGS\"" +#CONFIGURE_FLAGS+=" HDF5_CFLAGS=\"$HDF5_CFLAGS\"" +#CONFIGURE_FLAGS+=" LIBS=\"$LIBS\"" +#CONFIGURE_FLAGS+=" HDF5_LIBS=\"$HDF5_LIBS\"" +#CONFIGURE_FLAGS+=" HDF5_INCLUDE=\"$HDF5_INCLUDE\"" +CONFIGURE_FLAGS+=" --with-pcraster=internal" +CONFIGURE_FLAGS+=" --with-png=internal" +CONFIGURE_FLAGS+=" --with-libtiff=internal" +CONFIGURE_FLAGS+=" --with-geotiff=internal" +CONFIGURE_FLAGS+=" --with-jpeg=internal" +CONFIGURE_FLAGS+=" --with-gif=internal" +CONFIGURE_FLAGS+=" --with-python=yes" +CONFIGURE_FLAGS+=" --with-geos=yes" +CONFIGURE_FLAGS+=" --with-sqlite3=yes" +CONFIGURE_FLAGS+=" --with-hdf5=${HDF5_ROOT_DIR}" +CONFIGURE_FLAGS+=" --with-netcdf=${NETCDF_ROOT_DIR}" + echo -echo "*** configure --prefix=$PRODUCT_INSTALL $CONFIGURE_FLAGS" +echo "*** configure $CONFIGURE_FLAGS" rm -rf $BUILD_DIR mkdir -p $BUILD_DIR -cd $SOURCE_DIR -$SOURCE_DIR/gdal/configure --prefix=$PRODUCT_INSTALL $CONFIGURE_FLAGS +cd $SOURCE_DIR/gdal +./configure --prefix=$PRODUCT_INSTALL $CONFIGURE_FLAGS if [ $? -ne 0 ] then echo "ERROR on configure" @@ -25,7 +59,7 @@ then fi echo echo "*** make" $MAKE_OPTIONS -make -F GNUMakefile $MAKE_OPTIONS +make $MAKE_OPTIONS if [ $? -ne 0 ] then echo "ERROR on make" diff --git a/products/compil_scripts/zeromq-4.3.1.sh b/products/compil_scripts/zeromq-4.3.1.sh new file mode 100755 index 0000000..e01996a --- /dev/null +++ b/products/compil_scripts/zeromq-4.3.1.sh @@ -0,0 +1,82 @@ +#!/bin/bash + +echo "##########################################################################" +echo "zeromq" $VERSION +echo "##########################################################################" + +if [ -n "$MPI_ROOT_DIR" ] +then + echo "WARNING: setting CC and CXX environment variables and target MPI wrapper" + export CC=${MPI_ROOT_DIR}/bin/mpicc + export CXX=${MPI_ROOT_DIR}/bin/mpicxx +fi + +CMAKE_OPTIONS="" +CMAKE_OPTIONS+=" -DCMAKE_INSTALL_PREFIX:STRING=${PRODUCT_INSTALL}" + +if [ -n "$TBB_ROOT_DIR" ] && [ "${TBB_ROOT_DIR}" != "/usr" ]; then + CMAKE_OPTIONS+=" -DTBB_ROOT_DIR=${TBB_ROOT_DIR}" +fi + +### libxml2 settings +if [ -n "$LIBXML2_ROOT_DIR" ] && [ "${LIBXML2_ROOT_DIR}" != "/usr" ]; then + CMAKE_OPTIONS+=" -DLIBXML2_INCLUDE_DIR:STRING=${LIBXML2_ROOT_DIR}/include/libxml2" + CMAKE_OPTIONS+=" -DLIBXML2_LIBRARIES:STRING=${LIBXML2_ROOT_DIR}/lib/libxml2.so" + CMAKE_OPTIONS+=" -DLIBXML2_XMLLINT_EXECUTABLE=${LIBXML2_ROOT_DIR}/bin/xmllint" +fi + +# HDF5 +if [ -n "$HDF5_ROOT_DIR" ] && [ "${HDF5_ROOT_DIR}" != "/usr" ]; then + CMAKE_OPTIONS+=" -DHDF5_DIR:PATH=${HDF5_ROOT_DIR}/share/cmake/hdf5" + CMAKE_OPTIONS+=" -DHDF5_USE_STATIC_LIBRARIES:BOOL=OFF" + CMAKE_OPTIONS+=" -DHDF5_ROOT:PATH=${HDF5_ROOT_DIR}" + CMAKE_OPTIONS+=" -DHDF5_hdf5_LIBRARY_RELEASE=${HDF5_ROOT_DIR}/lib" + CMAKE_OPTIONS+=" -DHDF5_hdf5_hl_LIBRARY_RELEASE=${HDF5_ROOT_DIR}/lib/libhdf5_hl.so" + CMAKE_OPTIONS+=" -DHDF5_HL_LIBRARY=${HDF5_ROOT_DIR}/lib/libhdf5_hl.so" + CMAKE_OPTIONS+=" -DHDF5_C_INCLUDE_DIR=${HDF5_ROOT_DIR}/include" +fi + +### libxml2 settings +if [ -n "$LIBXML2_ROOT_DIR" ] && [ "${LIBXML2_ROOT_DIR}" != "/usr" ]; then + CMAKE_OPTIONS+=" -DLIBXML2_INCLUDE_DIR:STRING=${LIBXML2_ROOT_DIR}/include/libxml2" + CMAKE_OPTIONS+=" -DLIBXML2_LIBRARIES:STRING=${LIBXML2_ROOT_DIR}/lib/libxml2.so" + CMAKE_OPTIONS+=" -DLIBXML2_XMLLINT_EXECUTABLE=${LIBXML2_ROOT_DIR}/bin/xmllint" +fi + +## nlopt +if [ -n "$NLOPT_ROOT_DIR" ] && [ "${NLOPT_ROOT_DIR}" != "/usr" ]; then + CMAKE_OPTIONS+=" -DNLOPT_INCLUDE_DIRS:STRING=${NLOPT_ROOT_DIR}/include" + CMAKE_OPTIONS+=" -DNLOPT_LIBRARIES:STRING=${NLOPT_ROOT_DIR}/lib" + CMAKE_OPTIONS+=" -DNLOPT_DIR:STRING=${NLOPT_ROOT_DIR}" +fi + +echo +echo "*** cmake" $CMAKE_OPTIONS +cd $BUILD_DIR +cmake $CMAKE_OPTIONS $SOURCE_DIR/ +if [ $? -ne 0 ] +then + echo "ERROR on cmake" + exit 1 +fi + +echo +echo "*** make" $MAKE_OPTIONS +make $MAKE_OPTIONS +if [ $? -ne 0 ] +then + echo "ERROR on make" + exit 2 +fi + +echo +echo "*** make install" +make install +if [ $? -ne 0 ] +then + echo "ERROR on make install" + exit 3 +fi + +echo +echo "########## END" diff --git a/products/env_scripts/PERSALYS.py b/products/env_scripts/PERSALYS.py new file mode 100644 index 0000000..76c1ea7 --- /dev/null +++ b/products/env_scripts/PERSALYS.py @@ -0,0 +1,17 @@ +#!/usr/bin/env python +import os.path + +def set_env(env, prereq_dir, version): + env.set('PERSALYS_ROOT_DIR', prereq_dir) + env.set('PERSALYS_VERSION',version) + env.set('OTGUI_DIR', prereq_dir) + env.prepend('PATH', os.path.join(prereq_dir,'bin')) + env.prepend('LD_LIBRARY_PATH', os.path.join(prereq_dir, 'lib')) + env.prepend('PV_PLUGIN_PATH', os.path.join(prereq_dir, 'lib')) + pyver = 'python' + env.get('PYTHON_VERSION') + env.prepend('PYTHONPATH', os.path.join(prereq_dir, 'lib', pyver, 'site-packages')) + env.set('OTGUI_HTML_DOCUMENTATION_PATH',os.path.join(prereq_dir,'share','otgui','doc','html')) + env.set('PERSALYS_HTML_DOCUMENTATION_PATH', os.path.join(prereq_dir,'share','persalys','doc','html')) + +def set_nativ_env(env): + pass diff --git a/products/env_scripts/Sphinx.py b/products/env_scripts/Sphinx.py index 7b363f3..9add378 100755 --- a/products/env_scripts/Sphinx.py +++ b/products/env_scripts/Sphinx.py @@ -7,6 +7,7 @@ import platform def set_env(env, prereq_dir, version): env.set('SPHINXDIR', prereq_dir) env.set('SPHINX_ROOT_DIR', prereq_dir) + env.set('SPHINX_INSTALL_DIR', prereq_dir) if not platform.system() == "Windows" : env.prepend('PATH',prereq_dir) env.set('SPHINX_EXECUTABLE',os.path.join(prereq_dir, 'Scripts','sphinx-build.exe')) @@ -17,4 +18,5 @@ def set_env(env, prereq_dir, version): def set_nativ_env(env): env.set('SPHINXDIR', '/usr') + env.set('SPHINX_INSTALL_DIR', '/usr') env.set('SPHINX_ROOT_DIR', '/usr') diff --git a/products/env_scripts/gdal.py b/products/env_scripts/gdal.py index 10e1c13..c66e824 100644 --- a/products/env_scripts/gdal.py +++ b/products/env_scripts/gdal.py @@ -3,6 +3,7 @@ import os.path def set_env(env, prereq_dir, version): env.set('GDAL_ROOT_DIR', prereq_dir) + env.set('GDALHOME', prereq_dir) env.set('GDAL_VERSION',version) env.prepend('PATH', os.path.join(prereq_dir,'bin')) env.prepend('LD_LIBRARY_PATH',os.path.join(prereq_dir, 'lib')) diff --git a/products/env_scripts/nose.py b/products/env_scripts/nose.py new file mode 100644 index 0000000..0811867 --- /dev/null +++ b/products/env_scripts/nose.py @@ -0,0 +1,14 @@ +#!/usr/bin/env python +#-*- coding:utf-8 -*- + +import os +import platform + +def set_env(env, prereq_dir, version): + env.set("NOSE_ROOT_DIR",prereq_dir) + pyver = 'python' + env.get('PYTHON_VERSION') + if not platform.system() == "Windows" : + env.prepend('PYTHONPATH', os.path.join(prereq_dir, 'lib', pyver, 'site-packages')) + +def set_nativ_env(env): + pass diff --git a/products/env_scripts/openturns.py b/products/env_scripts/openturns.py index 6a77f3f..f6ffe02 100644 --- a/products/env_scripts/openturns.py +++ b/products/env_scripts/openturns.py @@ -3,6 +3,7 @@ import os.path def set_env(env, prereq_dir, version): env.set('OPENTURNS_ROOT_DIR', prereq_dir) + env.set('OPENTURNS_HOME', prereq_dir) env.set('OPENTURNS_VERSION',version) env.prepend('PATH', os.path.join(prereq_dir,'bin')) env.prepend('LD_LIBRARY_PATH',os.path.join(prereq_dir, 'lib')) diff --git a/products/env_scripts/qwt.py b/products/env_scripts/qwt.py index 1632ab1..75afecf 100755 --- a/products/env_scripts/qwt.py +++ b/products/env_scripts/qwt.py @@ -7,7 +7,6 @@ import platform def set_env(env, prereq_dir, version): env.set('QWTHOME', prereq_dir) env.set('QWT_ROOT_DIR', prereq_dir) - if platform.system() == "Windows" : env.prepend('PATH', os.path.join(prereq_dir, 'lib')) else: diff --git a/products/env_scripts/zeromq.py b/products/env_scripts/zeromq.py new file mode 100644 index 0000000..2c125c0 --- /dev/null +++ b/products/env_scripts/zeromq.py @@ -0,0 +1,12 @@ +#!/usr/bin/env python +import os.path + +def set_env(env, prereq_dir, version): + env.set('ZEROMQ_ROOT_DIR', prereq_dir) + env.set('ZEROMQHOME', prereq_dir) + env.set('ZEROMQ_VERSION',version) + env.prepend('PATH', os.path.join(prereq_dir,'bin')) + env.prepend('LD_LIBRARY_PATH',os.path.join(prereq_dir, 'lib')) + +def set_nativ_env(env): + pass diff --git a/products/netcdf.pyconf b/products/netcdf.pyconf index 202f145..2d9fa6e 100644 --- a/products/netcdf.pyconf +++ b/products/netcdf.pyconf @@ -39,4 +39,5 @@ default_win : version_4_6_2: { compil_script : 'netcdf-4.6.2' + $VARS.scriptExtension + patches : ['netcdf-4.6.2-001.patch'] } diff --git a/products/nose.pyconf b/products/nose.pyconf new file mode 100644 index 0000000..a2d0bae --- /dev/null +++ b/products/nose.pyconf @@ -0,0 +1,31 @@ +default : +{ + name : "nose" + build_source : "script" + compil_script : 'pip_install' + $VARS.scriptExtension + get_source : "archive" + system_info : + { + rpm : ["python3-nose"] + rpm_dev : [] + apt : ["python3-nose"] + apt_dev : [] + } + archive_info: + { + archive_name : $name + "-" + $APPLICATION.products.nose + ".tar.gz" + } + environ : + { + env_script : $name + ".py" + } + depend : ['Python', 'six', 'setuptools'] + 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" + } +} diff --git a/products/patches/PERSALYS-v11-001.patch b/products/patches/PERSALYS-v11-001.patch new file mode 100644 index 0000000..84f3f29 --- /dev/null +++ b/products/patches/PERSALYS-v11-001.patch @@ -0,0 +1,27 @@ +--- PERSALYS_ref/CMakeLists.txt 2022-01-11 16:27:50.000000000 +0100 ++++ PERSALYS_new/CMakeLists.txt 2022-02-26 22:36:24.413388375 +0100 +@@ -27,6 +27,16 @@ + # set module dir to find custom scripts + list ( APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ) + ++# Common CMake macros ++# =================== ++SET(CONFIGURATION_ROOT_DIR $ENV{CONFIGURATION_ROOT_DIR} CACHE PATH "Path to the Salome CMake configuration files") ++IF(EXISTS ${CONFIGURATION_ROOT_DIR}) ++ LIST(APPEND CMAKE_MODULE_PATH "${CONFIGURATION_ROOT_DIR}/cmake") ++ INCLUDE(SalomeMacros NO_POLICY_SCOPE) ++ELSE() ++ MESSAGE(FATAL_ERROR "We absolutely need the Salome CMake configuration files, please define CONFIGURATION_ROOT_DIR !") ++ENDIF() ++ + + if (USE_COTIRE) + if (POLICY CMP0058) +@@ -63,6 +73,7 @@ + list (APPEND PERSALYS_DEFINITIONS "-DPERSALYS_STATIC -DPYINTERP_STATIC -DPYCONSOLE_STATIC") + endif () + ++FIND_PACKAGE(SalomeBoost REQUIRED) + find_package (Boost COMPONENTS filesystem locale REQUIRED) + if (TARGET Boost::filesystem) + set (Boost_LIBRARIES Boost::filesystem Boost::locale) diff --git a/products/patches/netcdf-4.6.2-001.patch b/products/patches/netcdf-4.6.2-001.patch new file mode 100644 index 0000000..b03ba6b --- /dev/null +++ b/products/patches/netcdf-4.6.2-001.patch @@ -0,0 +1,11 @@ +--- netcdf_ref/CMakeLists.txt 2022-01-23 21:24:33.029077174 +0100 ++++ netcdf_dev/CMakeLists.txt 2022-01-23 21:31:47.176203170 +0100 +@@ -750,7 +750,7 @@ + SET(H5_USE_16_API 0) + ENDIF() + +- FIND_PATH(HAVE_HDF5_H hdf5.h) ++ FIND_PATH(HAVE_HDF5_H hdf5.h PATHS ${HDF5_INCLUDE_DIR}) + IF(NOT HAVE_HDF5_H) + MESSAGE(FATAL_ERROR "Compiling a test with hdf5 failed. Either hdf5.h cannot be found, or the log messages should be checked for another reason.") + ELSE(NOT HAVE_HDF5_H) diff --git a/products/zeromq.pyconf b/products/zeromq.pyconf new file mode 100644 index 0000000..6356798 --- /dev/null +++ b/products/zeromq.pyconf @@ -0,0 +1,42 @@ +default : +{ + name : "zeromq" + build_source : "script" + compil_script : $name + $VARS.scriptExtension + get_source : "archive" + archive_info : + { + archive_name : "zeromq-" + $APPLICATION.products.zeromq + ".tar.gz" + } + environ : + { + env_script : $name + ".py" + } + depend : ['Python', 'lapack', 'hdf5', 'tbb', 'nlopt', 'libxml2', 'eigen', 'netcdf', 'gdal'] + build_depend : ["cmake", "swig"] + opt_depend : ['openmpi'] + patches : [] + source_dir : $APPLICATION.workdir + $VARS.sep + 'SOURCES' + $VARS.sep + $name + build_dir : $APPLICATION.workdir + $VARS.sep + 'BUILD' + $VARS.sep + $name + install_dir : 'base' + properties : + { + single_install_dir : "no" + incremental : "yes" + } +} + +default_win : +{ + properties : + { + single_install_dir : "yes" + } + depend : ['Python', 'lapack', 'hdf5', 'tbb', 'nlopt', 'libxml2', 'eigen', 'pthreads', 'netcdf', 'gdal'] + opt_depend : [] +} + +version_4_3_1: +{ + compil_script : 'zeromq-4.3.1' + $VARS.scriptExtension +} -- 2.39.2