]> SALOME platform Git repositories - tools/sat_salome.git/commitdiff
Salome HOME
spns #24377: DB10 and UB20.04
authorNabil Ghodbane <nabil.ghodbane@cea.fr>
Fri, 24 Sep 2021 17:03:48 +0000 (19:03 +0200)
committerNabil Ghodbane <nabil.ghodbane@cea.fr>
Fri, 24 Sep 2021 17:03:48 +0000 (19:03 +0200)
applications/SALOME-master-native.pyconf
products/PyFMI.pyconf
products/cminpack.pyconf
products/compil_scripts/PyFMI-2.5.sh [new file with mode: 0755]
products/compil_scripts/openturns-1.17.sh
products/env_scripts/PyFMI.py
products/env_scripts/cminpack.py

index 84dc4fcbfdad25c47f1333b9ed1d36e4b4881faa..dd985dcc35eaf1bc162d02628dd8d668c85ea51e 100644 (file)
@@ -40,7 +40,7 @@ APPLICATION :
         click : 'native'
         cmake : 'native'
         cppunit : 'native'
-        cminpack: '1.3.6'
+        cminpack: 'native'
         cycler : 'native'
         Cython : 'native'
         dateutil : 'native'
@@ -155,9 +155,9 @@ APPLICATION :
         'PYHELLO'
         'EFICAS'
         'EFICAS_TOOLS'
-       'PY2CPP'
-       'ADAO'
-       'ADAO_INTERFACE'
+        'PY2CPP'
+        'ADAO'
+        'ADAO_INTERFACE'
         'PARAVISADDONS'
         'CEATESTBASE' : {tag: 'SalomeV9'}
     }
@@ -240,7 +240,8 @@ __overwrite__ :
       'PRODUCTS.qt.default.system_info.rpm_dev' : ["qt5-qtbase-devel"]
    }
    {
-      # PyFMI not available as native package
-      'PRODUCTS.PyFMI.default.properties.pip' : "no"
+     __condition__ : "VARS.dist in ['DB10', 'UB20.04']"
+      'PRODUCTS.PyFMI.version_2_5.properties.pip' : "no"
+      'PRODUCTS.PyFMI.version_2_5.compil_script' : "PyFMI-2.5.sh"
    }
 ]
index d0ecc761df416609a5a053d8bc631ad8f4bc8ebb..a5b2c816a990954723d4f5986ac3c60a5364c1b5 100644 (file)
@@ -25,3 +25,12 @@ default :
       pip : "yes"
     }
 }
+
+version_2_5 :
+{
+    properties:
+    {
+      incremental : "yes"
+      pip : "yes"
+    }
+}
index c0344db15142865a3a2e94f2a5e84a5785181aa8..abdc5ee975f138b29e0441eb3eb43b5d131edbcd 100644 (file)
@@ -5,6 +5,13 @@ default :
     cmake_options : " -DUSE_BLAS=ON -DUSE_FPIC=ON -DBUILD_SHARED_LIBS=ON  -DCMAKE_INSTALL_LIBDIR:STRING=lib "
     compil_script :  $name + $VARS.scriptExtension
     get_source : "archive"
+    system_info :
+    {
+        rpm : ['cminpack']
+        rpm_dev : []
+        apt : ['libcminpack1']
+        apt_dev : ['libcminpack-dev']
+    }
     environ :
     {
        env_script : $name + ".py"
diff --git a/products/compil_scripts/PyFMI-2.5.sh b/products/compil_scripts/PyFMI-2.5.sh
new file mode 100755 (executable)
index 0000000..09004f8
--- /dev/null
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+#!/bin/bash                                                                                                                                                                              
+
+echo "##########################################################################"
+echo "PyFMI " $VERSION
+echo "##########################################################################"
+
+echo  "*** build in SOURCE directory"
+
+
+cd $BUILD_DIR
+cp -R $SOURCE_DIR/* .
+
+rm -f $BUILD_DIR/src/pyfmi/*.c
+mkdir -p $PRODUCT_INSTALL/lib/python${PYTHON_VERSION:0:3}/site-packages
+export PATH=$(pwd)/bin:$PATH
+export PYTHONPATH=$(pwd):$PYTHONPATH
+export PYTHONPATH=${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION:0:3}/site-packages:$PYTHONPATH
+
+echo
+echo "*** build with $PYTHONBIN"
+$PYTHONBIN setup.py build
+if [ $? -ne 0 ]
+then
+    echo "ERROR on build"
+    exit 2
+fi
+
+echo
+echo "*** install with $PYTHONBIN"
+$PYTHONBIN setup.py install --prefix=$PRODUCT_INSTALL --fmil-home=$PRODUCT_INSTALL
+if [ $? -ne 0 ]
+then
+    echo "ERROR on install"
+    exit 3
+fi
+
+echo
+echo "########## END"
index 9d0169ab65c199d6ef06b7f3fc736a30bbe0ab22..82c7c3652b8bcdc8a92664b36db713060eb9ceae 100755 (executable)
@@ -30,16 +30,25 @@ 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"
+
 # CMINPACK
-CMAKE_OPTIONS+=" -DCMINPACK_ROOT_DIR=${CMINPACK_ROOT_DIR}"
-CMAKE_OPTIONS+=" -DCMINPACK_INCLUDE_DIR=${CMINPACK_ROOT_DIR}/include/cminpack-1"
-CMAKE_OPTIONS+=" -DCMINPACK_LIBRARY=$CMINPACK_ROOT_DIR/lib/libcminpack_s.a"
+if [ "${CMINPACK_ROOT_DIR}" != "/usr" ]
+then
+    CMAKE_OPTIONS+=" -DCMINPACK_ROOT_DIR=${CMINPACK_ROOT_DIR}"
+    CMAKE_OPTIONS+=" -DCMINPACK_INCLUDE_DIR=${CMINPACK_ROOT_DIR}/include/cminpack-1"
+    CMAKE_OPTIONS+=" -DCMINPACK_LIBRARY=$CMINPACK_ROOT_DIR/lib/libcminpack_s.a"
+else
+    CMAKE_OPTIONS+=" -DCMINPACK_ROOT_DIR=${CMINPACK_ROOT_DIR}"
+    CMAKE_OPTIONS+=" -DCMINPACK_INCLUDE_DIR=${CMINPACK_ROOT_DIR}/include/cminpack-1"
+fi
 # Blas/Lapack
-CMAKE_OPTIONS+=" -DLAPACK_DIR=${LAPACK_ROOT_DIR}/lib/cmake/lapack-3.8.0"
-CMAKE_OPTIONS+=" -DCBLAS_DIR=${LAPACK_ROOT_DIR}/lib/cmake/cblas-3.8.0"
-CMAKE_OPTIONS+=" -DCBLAS_LIBRARIES=$LAPACK_ROOT_DIR/lib/libcblas.so"
-
-### libxml2 settings
+if [ "${CMINPACK_ROOT_DIR}" != "/usr" ]
+then
+    CMAKE_OPTIONS+=" -DLAPACK_DIR=${LAPACK_ROOT_DIR}/lib/cmake/lapack-3.8.0"
+    CMAKE_OPTIONS+=" -DCBLAS_DIR=${LAPACK_ROOT_DIR}/lib/cmake/cblas-3.8.0"
+    CMAKE_OPTIONS+=" -DCBLAS_LIBRARIES=$LAPACK_ROOT_DIR/lib/libcblas.so"
+fi
+    ### libxml2 settings
 if [ -n "$LIBXML2_ROOT_DIR" ]
 then
     # with a native libxml2, do not use these options
@@ -208,6 +217,7 @@ if [[ -d "$SOURCE_DIR/otfftw-0.11" ]]; then
     do 
         echo
         echo "*** C O M P O N E N T : $k-${OTP[$k]} "
+
         cd  $BUILD_DIR
         mkdir ${BUILD_DIR}/$k
         cd ${BUILD_DIR}/$k
index 7e83f24bf2c3a570b0583b8a105422e3d6b6e470..b9d18e898463a44909c10c7b79ae7f49216e5def 100644 (file)
@@ -6,6 +6,7 @@ import platform
 
 def set_env(env, prereq_dir, version):
     env.set('PYFMI_ROOT_DIR', prereq_dir)
-
+    pyver = 'python' + env.get('PYTHON_VERSION')
+    env.prepend('PYTHONPATH', os.path.join(prereq_dir, 'lib', pyver, 'site-packages'))
 def set_nativ_env(env):
     pass
index 201e8bd07c63031bb2022dcf9c1d267965a2c6fb..45a5378e75e253d51a515de2b3dcca42b145d977 100644 (file)
@@ -8,4 +8,5 @@ def set_env(env, prereq_dir, version):
     env.prepend('LD_LIBRARY_PATH',os.path.join(prereq_dir, 'lib'))
 
 def set_nativ_env(env):
+    env.set('CMINPACK_ROOT_DIR', '/usr')
     pass