From 5471237662c982cedcce3cf1006830810c2c0c57 Mon Sep 17 00:00:00 2001 From: Nabil Ghodbane Date: Tue, 25 Jan 2022 11:43:51 +0100 Subject: [PATCH] =?utf8?q?spns=20#26819=20Int=C3=A9gration=20de=20l'outil?= =?utf8?q?=20de=20couplage=20C3PO?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- applications/SALOME-master-MPI.pyconf | 1 + products/C3PO.pyconf | 29 +++++++++++++++++++++ products/compil_scripts/C3PO.sh | 37 +++++++++++++++++++++++++++ products/env_scripts/C3PO.py | 17 ++++++++++++ 4 files changed, 84 insertions(+) create mode 100644 products/C3PO.pyconf create mode 100755 products/compil_scripts/C3PO.sh create mode 100644 products/env_scripts/C3PO.py diff --git a/applications/SALOME-master-MPI.pyconf b/applications/SALOME-master-MPI.pyconf index b910bbd..e84ac2f 100644 --- a/applications/SALOME-master-MPI.pyconf +++ b/applications/SALOME-master-MPI.pyconf @@ -32,6 +32,7 @@ APPLICATION : Babel : '2.7.0' boost : '1.71.0' CAS : {tag: 'V7_5_3p1', section: 'version_V7_5_3p1'} + C3PO: 'v2.0' certifi : '2018.8.24' cgns : {tag : '4.1.1', hpc : 'yes'} chardet : '3.0.4' diff --git a/products/C3PO.pyconf b/products/C3PO.pyconf new file mode 100644 index 0000000..db6575d --- /dev/null +++ b/products/C3PO.pyconf @@ -0,0 +1,29 @@ +default : +{ + name : "C3PO" + build_source : "script" + compil_script : $name + $VARS.scriptExtension + get_source : "archive" + archive_info : {archive_name : "C3PO_public-" + $APPLICATION.products.C3PO + ".tar.gz"} + environ : + { + env_script : $name + ".py" + } + depend : [ + "docutils", + "Sphinx", + "setuptools", + "scipy", + "Python", + "numpy", + "MEDCOUPLING", + "medfile", + "openmpi" + ] + build_depend : ["cmake", "swig", "cppunit"] + source_dir : $APPLICATION.workdir + $VARS.sep + 'SOURCES' + $VARS.sep + $name + build_dir : $APPLICATION.workdir + $VARS.sep + 'BUILD' + $VARS.sep + $name + properties: + { + } +} diff --git a/products/compil_scripts/C3PO.sh b/products/compil_scripts/C3PO.sh new file mode 100755 index 0000000..fca7e01 --- /dev/null +++ b/products/compil_scripts/C3PO.sh @@ -0,0 +1,37 @@ +#!/bin/bash + +echo "##########################################################################" +echo "C3PO" $VERSION +echo "##########################################################################" + +echo "*** build in SOURCE directory" +cd $SOURCE_DIR + +mkdir -p $PRODUCT_INSTALL/lib/python${PYTHON_VERSION:0:3}/site-packages +export PATH=${PRODUCT_INSTALL}/bin:$PATH +export PYTHONPATH=$PWD:$PYTHONPATH +export PYTHONPATH=${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION:0:3}/site-packages:$PYTHONPATH + +echo +echo "*** build and install with $PYTHONBIN sources/setup.py install --prefix=$PRODUCT_INSTALL" +$PYTHONBIN sources/setup.py install --prefix=$PRODUCT_INSTALL +if [ $? -ne 0 ] +then + echo "ERROR on build/install" + exit 3 +fi +cd $SOURCE_DIR + +export LD_LIBRARY_PATH="${MEDCOUPLING_ROOT_DIR}/lib:${LD_LIBRARY_PATH}" +export PYTHONPATH="${MEDCOUPLING_ROOT_DIR}/${PYTHON_LIBDIR}:${PYTHONPATH}" +export PYTHONPATH="${MEDCOUPLING_ROOT_DIR}/lib:${PYTHONPATH}" +export PYTHONPATH="${MEDCOUPLING_ROOT_DIR}/bin:${PYTHONPATH}" +ctest . +if [ $? -ne 0 ] +then + echo "ERROR on ctest" + exit 4 +fi + +echo +echo "########## END" diff --git a/products/env_scripts/C3PO.py b/products/env_scripts/C3PO.py new file mode 100644 index 0000000..b5bfbed --- /dev/null +++ b/products/env_scripts/C3PO.py @@ -0,0 +1,17 @@ +#!/usr/bin/env python +#-*- coding:utf-8 -*- + +import os.path +import platform + +def set_env(env, prereq_dir, version): + env.set('C3PODIR', prereq_dir) + env.set('C3PO_ROOT_DIR', prereq_dir) + if not platform.system() == "Windows" : + env.prepend('PATH',prereq_dir) + env.prepend('PATH', os.path.join(prereq_dir, 'bin')) + pyver = 'python' + env.get('PYTHON_VERSION') + env.prepend('PYTHONPATH', os.path.join(prereq_dir, 'lib', pyver, 'site-packages')) + +def set_nativ_env(env): + pass -- 2.39.2