]> SALOME platform Git repositories - tools/sat_salome.git/commitdiff
Salome HOME
spns #26819 Intégration de l'outil de couplage C3PO
authorNabil Ghodbane <nabil.ghodbane@cea.fr>
Tue, 25 Jan 2022 10:43:51 +0000 (11:43 +0100)
committerNabil Ghodbane <nabil.ghodbane@cea.fr>
Tue, 25 Jan 2022 10:43:51 +0000 (11:43 +0100)
applications/SALOME-master-MPI.pyconf
products/C3PO.pyconf [new file with mode: 0644]
products/compil_scripts/C3PO.sh [new file with mode: 0755]
products/env_scripts/C3PO.py [new file with mode: 0644]

index b910bbd162bb53f88e02fda982e1e9a07308cada..e84ac2faca0ee064cfd15fe958126d87f4563811 100644 (file)
@@ -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 (file)
index 0000000..db6575d
--- /dev/null
@@ -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 (executable)
index 0000000..fca7e01
--- /dev/null
@@ -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 (file)
index 0000000..b5bfbed
--- /dev/null
@@ -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