From: Quentin Cozette Date: Mon, 29 Mar 2021 17:24:56 +0000 (+0200) Subject: Anticipate soon integration of psutil use (get associated files from master branch... X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=154ab3f628970195841a0a8e9fa270ed3890fd57;p=tools%2Fsat_salome.git Anticipate soon integration of psutil use (get associated files from master branch) - Remove SOLVERLAB use in master configuration (issue related to tbb) --- diff --git a/applications/SALOME-master-MPI.pyconf b/applications/SALOME-master-MPI.pyconf index 08f0a8d..4a5475d 100644 --- a/applications/SALOME-master-MPI.pyconf +++ b/applications/SALOME-master-MPI.pyconf @@ -78,6 +78,7 @@ APPLICATION : petsc : '3.14.0' Pillow : '7.1.1' planegcs : '0.18-3cb6890' + psutil : '5.7.2' Pygments : '2.0.2' pyparsing : '2.0.3' PyQt : '5.9' diff --git a/applications/SALOME-master-native.pyconf b/applications/SALOME-master-native.pyconf index 37d99a0..9390c3f 100644 --- a/applications/SALOME-master-native.pyconf +++ b/applications/SALOME-master-native.pyconf @@ -83,6 +83,7 @@ APPLICATION : Pillow : 'native' # 'native' not exists : freeCAD part but not delivered with it from package handler planegcs : '0.18-3cb6890' + psutil : 'native' Pygments : 'native' pyparsing : 'native' PyQt : 'native' @@ -136,7 +137,7 @@ APPLICATION : 'JOBMANAGER' 'YACS' 'YACSGEN' - 'SOLVERLAB' +# 'SOLVERLAB' 'DOCUMENTATION' 'SAMPLES' 'COMPONENT' diff --git a/applications/SALOME-master-windows.pyconf b/applications/SALOME-master-windows.pyconf index f1453e9..3504619 100644 --- a/applications/SALOME-master-windows.pyconf +++ b/applications/SALOME-master-windows.pyconf @@ -86,6 +86,7 @@ APPLICATION : perl : '5.28.1.1' Pillow : '7.1.1' planegcs : '0.18-3cb6890' + psutil : '5.7.2' pthreads : '2.9.1' Pygments : '2.4.2' pyparsing : '2.4.0' diff --git a/applications/SALOME-master.pyconf b/applications/SALOME-master.pyconf index 6682228..687011f 100644 --- a/applications/SALOME-master.pyconf +++ b/applications/SALOME-master.pyconf @@ -78,6 +78,7 @@ APPLICATION : petsc : '3.14.0' Pillow : '7.1.1' planegcs : '0.18-3cb6890' + psutil : '5.7.2' Pygments : '2.0.2' pyparsing : '2.0.3' PyQt : '5.15.3' diff --git a/products/KERNEL.pyconf b/products/KERNEL.pyconf index ee76090..5f93e72 100644 --- a/products/KERNEL.pyconf +++ b/products/KERNEL.pyconf @@ -29,7 +29,8 @@ default : "setuptools", "Pygments", "pytz", - "LIBBATCH" + "LIBBATCH", + "psutil" ] build_depend : ["cmake", "swig", "doxygen", "cppunit"] source_dir : $APPLICATION.workdir + $VARS.sep + 'SOURCES' + $VARS.sep + $name @@ -61,7 +62,8 @@ default_win : "Pygments", "pytz", "LIBBATCH", - "graphviz" + "graphviz", + "psutil" ] build_depend : ["cmake", "swig", "doxygen", "cppunit"] } @@ -86,7 +88,8 @@ default_MPI : "pytz", "cppunit", "openmpi", - "LIBBATCH" + "LIBBATCH", + "psutil" ] } diff --git a/products/compil_scripts/psutil.sh b/products/compil_scripts/psutil.sh new file mode 100644 index 0000000..b45c315 --- /dev/null +++ b/products/compil_scripts/psutil.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +echo "##########################################################################" +echo "psutil" $VERSION +echo "##########################################################################" + + + +echo "*** build in SOURCE directory" +cd $SOURCE_DIR + +# we don't install in python directory -> modify environment as described in INSTALL file +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 and install with $PYTHONBIN" +$PYTHONBIN setup.py install --prefix=$PRODUCT_INSTALL +if [ $? -ne 0 ] +then + echo "ERROR on build/install" + exit 3 +fi + +echo +echo "######psutil END" diff --git a/products/env_scripts/psutil.py b/products/env_scripts/psutil.py new file mode 100644 index 0000000..248ed43 --- /dev/null +++ b/products/env_scripts/psutil.py @@ -0,0 +1,16 @@ +#!/usr/bin/env python +#-*- coding:utf-8 -*- + +import os.path, platform + +def set_env(env, prereq_dir, version): + env.set("PSUTIL_ROOT_DIR",prereq_dir) + + versionPython = env.get('PYTHON_VERSION') + if not platform.system() == "Windows" : + env.prepend('PYTHONPATH',os.path.join(prereq_dir, 'lib', 'python' + versionPython, 'site-packages')) + env.prepend('PATH', os.path.join(prereq_dir, 'bin')) + env.prepend('PYTHONPATH',os.path.join(prereq_dir, 'bin')) + +def set_nativ_env(env): + pass diff --git a/products/psutil.pyconf b/products/psutil.pyconf new file mode 100644 index 0000000..344e3cf --- /dev/null +++ b/products/psutil.pyconf @@ -0,0 +1,33 @@ +default : +{ + name : "psutil" + build_source : "script" + compil_script : 'pip_install' + $VARS.scriptExtension + get_source : "archive" + system_info : + { + rpm : ["python3-psutil"] + rpm_dev : [] + apt : ["python3-psutil"] + apt_dev : [] + } + environ : + { + env_script : $name + ".py" + } + depend : ['Python', '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" + } +} + +default_win : +{ + compil_script : 'pip_install_whl' + $VARS.scriptExtension + archive_info : {archive_name : "psutil-" + $APPLICATION.products.psutil + "_windows.tar.gz"} +}