]> SALOME platform Git repositories - tools/sat_salome.git/commitdiff
Salome HOME
use nlopt embedded on FD32; fix statsmodels installation on RO9
authorGuytri KASTANE <guytri.kastane@cea.fr>
Mon, 28 Oct 2024 13:48:57 +0000 (14:48 +0100)
committerGuytri KASTANE <guytri.kastane@cea.fr>
Mon, 28 Oct 2024 13:48:57 +0000 (14:48 +0100)
applications/SALOME-master-native.pyconf
products/compil_scripts/openturns-1.23.sh
products/compil_scripts/patsy-0.5.4.sh [new file with mode: 0755]
products/compil_scripts/statsmodels-0.14.1.sh [new file with mode: 0755]
products/env_scripts/patsy.py [new file with mode: 0644]
products/env_scripts/statsmodels.py [new file with mode: 0644]
products/patsy.pyconf
products/statsmodels.pyconf

index 39d544991ce04216c69f1688fd287aeab76fd065..ef0d1f29e4c0d90681679c2bb6bf451a2a7c2b0e 100644 (file)
@@ -112,6 +112,7 @@ APPLICATION :
         packaging : 'native'
         packagespy : '74152cd'
         pandas : 'native'
+        patsy : 'native'
         ParaView : {tag:'5.11.0', base: 'no',  section: 'version_5_11_0_MPI', hpc: 'yes'}
         PERSALYS : 'v16.0.1'
         petsc : {tag : '3.16.0', section: 'version_3_16_0'}
@@ -389,6 +390,7 @@ __overwrite__ :
          'APPLICATION.products.opencv'           : '3.2.0'
          'APPLICATION.products.openmpi'          : '4.1.5'
          'APPLICATION.products.sip'              : '5.5.0'
+         'APPLICATION.products.patsy'            : {tag: '0.5.4',   base: 'no', section: 'version_0_5_4_no_pip'              }
          'APPLICATION.products.root'             : {tag: '6.22.02', base: 'no', section: 'version_6_22_02_CO9'               }
          'APPLICATION.products.qt'               : {tag: '5.15.2',  base: 'no', section: 'version_5_15_2_CO9'                }
          'APPLICATION.products.mdurl'            : {tag: '0.1.2',   base: 'no', section: 'version_0_1_2_no_pip'              }
@@ -399,7 +401,7 @@ __overwrite__ :
          'APPLICATION.products.PyFMI'            : {tag: '2.6',     base: 'no', section: 'version_2_6_no_pip'                }
          'APPLICATION.products.numpydoc'         : {tag: '0.9.0',   base: 'no', section: 'version_0_9_0_no_pip'              }
          'APPLICATION.products.pandas'           : {tag: '1.1.5',   base: 'no', section: 'version_1_1_5_no_pip'              }
-         'APPLICATION.products.statsmodels'      : {tag: '0.6.1',   base: 'no', section: 'version_0_6_1_no_pip'              }
+         'APPLICATION.products.statsmodels'      : {tag: '0.14.1',   base: 'no', section: 'version_0_14_1_no_pip'              }
          'APPLICATION.products.nose'             : {tag: '1.3.7',   base: 'no', section: 'version_1_3_7_no_pip'              }
          'APPLICATION.products.ParaView'         : {tag: '5.11.0',  base: 'no', section: 'version_5_11_0_MPI_CO9', hpc: 'yes'}
          'APPLICATION.products.YDEFX'            : {tag: 'master',  base: 'no', section: 'version_master_CO9'                }
@@ -409,6 +411,7 @@ __overwrite__ :
     {
         __condition__ : "VARS.dist in ['FD32']"
         'APPLICATION.rm_products'               : ['nose_py3','assimulo'] #
+        'APPLICATION.products.nlopt'            : '2.7.0'
         'APPLICATION.products.opencv'           : '3.2.0'
         'APPLICATION.products.qt'               : '5.15.2'
         'APPLICATION.products.qwt'              : '6.1.6'
index 2976a2d58eb9689b08b1ed9e9cc3b4f014edb71e..43686b30177a463f5bc18e799887c5024715e283 100755 (executable)
@@ -347,7 +347,7 @@ if [[ -d "$SOURCE_DIR/otfftw-0.15" ]]; then
                         echo "WARNING: dill is already installed"
                 fi
                 echo "INFO: install pythonfmu-0.6.3"
-                if ! ${PYTOHNBIN} -c "import pythonfmu"; then
+                if ! ${PYTHONBIN} -c "import pythonfmu"; then
                     ${PYTHONBIN} -m pip install  --cache-dir=$BUILD_DIR/cache/pip $SOURCE_DIR/pythonfmu-0.6.3/pythonfmu-0.6.3-py3-none-any.whl --no-deps  --prefix=$PRODUCT_INSTALL
                     if [ $? -ne 0 ]
                     then
@@ -364,7 +364,7 @@ if [[ -d "$SOURCE_DIR/otfftw-0.15" ]]; then
                 fi
                 echo "INFO: install joblib-1.1.0"
                 if ! ${PYTHONBIN} -c "import joblib"; then
-                                                 ${PYTHONBIN} -m pip install  --cache-dir=$BUILD_DIR/cache/pip $SOURCE_DIR/joblib-1.1.0/joblib-1.1.0-py2.py3-none-any.whl --no-deps
+                    ${PYTHONBIN} -m pip install  --cache-dir=$BUILD_DIR/cache/pip $SOURCE_DIR/joblib-1.1.0/joblib-1.1.0-py2.py3-none-any.whl --no-deps
                     if [ $? -ne 0 ]; then
                         echo "FATAL: could not install joblib-1.1.0"
                         exit 6
@@ -401,7 +401,7 @@ if [[ -d "$SOURCE_DIR/otfftw-0.15" ]]; then
                     echo "WARNING: sklearn is already installed"
                 fi
                 echo "INFO: install threadpoolctl-3.0.0"
-                if ! ${PPYTHONBIN} -c "import threadpoolctl"; then
+                if ! ${PYTHONBIN} -c "import threadpoolctl"; then
                     ${PYTHONBIN} -m pip install --cache-dir=$BUILD_DIR/cache/pip  $SOURCE_DIR/threadpoolctl-3.0.0/threadpoolctl-3.0.0-py3-none-any.whl --no-deps --prefix=$PRODUCT_INSTALL
                     if [ $? -ne 0 ]
                     then
diff --git a/products/compil_scripts/patsy-0.5.4.sh b/products/compil_scripts/patsy-0.5.4.sh
new file mode 100755 (executable)
index 0000000..7c071b8
--- /dev/null
@@ -0,0 +1,57 @@
+#!/bin/bash
+
+echo "##########################################################################"
+echo "patsy " $VERSION
+echo "##########################################################################"
+
+rm -rf $BUILD_DIR
+mkdir $BUILD_DIR
+cd $BUILD_DIR
+cp -R $SOURCE_DIR/* .
+
+USE_OLD_SETUPTOOLS=false
+
+if [[ $DIST_NAME == "CO" && "$SAT_Python_IS_NATIVE" == "1" ]]; then
+    PRODUCT_LIB=lib64
+else
+    PRODUCT_LIB=lib
+fi
+#mkdir -p $PRODUCT_INSTALL/${PRODUCT_LIB}/python${PYTHON_VERSION}/site-packages
+export PATH=$(pwd)/bin:$PATH
+export PYTHONPATH=$(pwd):$PYTHONPATH
+export PYTHONPATH=${PRODUCT_INSTALL}/${PRODUCT_LIB}/python${PYTHON_VERSION}/site-packages:$PYTHONPATH
+    
+echo
+if [ $USE_OLD_SETUPTOOLS ]; then
+    echo "*** install with ${PYTHONBIN} -m pip install --cache-dir=$BUILD_DIR/cache/pip . --no-deps  --prefix=$PRODUCT_INSTALL"
+    ${PYTHONBIN} -m pip install --cache-dir=$BUILD_DIR/cache/pip . --no-deps  --prefix=$PRODUCT_INSTALL
+else
+    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
+    if [ $? -ne 0 ]
+    then
+        echo "ERROR on install"
+        exit 3
+    fi
+fi
+
+if [ -d "${PRODUCT_INSTALL}/lib64" ]; then
+    echo "WARNING: moving lib64 to lib"
+    mv $PRODUCT_INSTALL/lib64 $PRODUCT_INSTALL/lib
+elif [ -d "${PRODUCT_INSTALL}/local/lib64" ]; then
+    echo "WARNING: moving local/lib64 to lib"
+    mv $PRODUCT_INSTALL/local/lib64 $PRODUCT_INSTALL/lib
+    rm -rf ${PRODUCT_INSTALL}/local/lib64
+fi
+
+echo
+echo "########## END"
diff --git a/products/compil_scripts/statsmodels-0.14.1.sh b/products/compil_scripts/statsmodels-0.14.1.sh
new file mode 100755 (executable)
index 0000000..ca41589
--- /dev/null
@@ -0,0 +1,49 @@
+#!/bin/bash
+
+echo "##########################################################################"
+echo "statsmodels " $VERSION
+echo "##########################################################################"
+
+rm -rf $BUILD_DIR
+mkdir $BUILD_DIR
+cd $BUILD_DIR
+cp -R $SOURCE_DIR/* .
+
+USE_OLD_SETUPTOOLS=false
+
+echo
+if [ $USE_OLD_SETUPTOOLS ]; then
+    echo "*** install with ${PYTHONBIN} -m pip install --cache-dir=$BUILD_DIR/cache/pip . --no-deps  --prefix=$PRODUCT_INSTALL"
+    ${PYTHONBIN} -m pip install --cache-dir=$BUILD_DIR/cache/pip . --no-deps  --prefix=$PRODUCT_INSTALL
+else
+    mkdir -p $PRODUCT_INSTALL/lib/python${PYTHON_VERSION}/site-packages
+    
+    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
+    if [ $? -ne 0 ]
+    then
+        echo "ERROR on install"
+        exit 3
+    fi
+fi
+
+if [ -d "${PRODUCT_INSTALL}/lib64" ]; then
+    echo "WARNING: moving lib64 to lib"
+    mv $PRODUCT_INSTALL/lib64 $PRODUCT_INSTALL/lib
+elif [ -d "${PRODUCT_INSTALL}/local/lib64" ]; then
+    echo "WARNING: moving local/lib64 to lib"
+    mv $PRODUCT_INSTALL/local/lib64 $PRODUCT_INSTALL/lib
+    rm -rf ${PRODUCT_INSTALL}/local/lib64
+fi
+
+echo
+echo "########## END"
diff --git a/products/env_scripts/patsy.py b/products/env_scripts/patsy.py
new file mode 100644 (file)
index 0000000..5e3ff19
--- /dev/null
@@ -0,0 +1,13 @@
+#!/usr/bin/env python
+#-*- coding:utf-8 -*-
+
+import os.path
+import platform
+def set_env(env, prereq_dir, version):
+    env.set('PATSY_ROOT_DIR', prereq_dir)
+    if not platform.system() == "Windows" :
+        pyver = 'python' + env.get('PYTHON_VERSION')
+        env.prepend('PYTHONPATH', os.path.join(prereq_dir, 'lib', pyver, 'site-packages'))
+
+def set_nativ_env(env):
+    pass
diff --git a/products/env_scripts/statsmodels.py b/products/env_scripts/statsmodels.py
new file mode 100644 (file)
index 0000000..20e4bcd
--- /dev/null
@@ -0,0 +1,13 @@
+#!/usr/bin/env python
+#-*- coding:utf-8 -*-
+
+import os.path
+import platform
+def set_env(env, prereq_dir, version):
+    env.set('STATSMODELS_ROOT_DIR', prereq_dir)
+    if not platform.system() == "Windows" :
+        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 107fad8ff9fa55d1a999487c5833f709d8164c92..5aeef58080e3235c47d9efbae46e46e50d654c00 100644 (file)
@@ -6,14 +6,14 @@ default :
     get_source : "archive"
     system_info : 
     {
-        rpm : []
-        rpm_dev : []
-        apt : []
-        apt_dev : []
+        rpm : ['python3-patsy']
+        rpm_dev : ['python3-patsy']
+        apt : ['python3-patsy']
+        apt_dev : ['python3-patsy']
     }
     environ :
     {
-
+        env_script : $name + ".py"
     }
     depend : ["Python", "setuptools"]
     opt_depend : ['pandas']
@@ -26,3 +26,13 @@ default :
       pip : "yes"
     }
 }
+
+version_0_5_4_no_pip :
+{
+   compil_script : "patsy-0.5.4" + $VARS.scriptExtension 
+    properties:
+    {
+      incremental : "yes"
+      pip : "no"
+    }
+}
index b022a545e1f1d5a44ee6fb67b5a3f0ebb7b78aa7..d8d267d429a5f9cf12116fd3837a324f1343a571 100644 (file)
@@ -13,7 +13,7 @@ default :
     }
     environ :
     {
-
+        env_script : $name + ".py"
     }
     depend : ["Python", "setuptools","PyFMI", "numpy", "scipy", "matplotlib", "packaging"]
     opt_depend : ['pandas', 'patsy', 'Pillow']
@@ -27,6 +27,16 @@ default :
     }
 }
 
+version_0_14_1_no_pip:
+{
+   compil_script : "statsmodels-0.14.1" + $VARS.scriptExtension
+   properties:
+    {
+      incremental : "yes"
+      pip : "no"
+    }
+}
+
 version_0_10_2:
 {
    properties: