From: Nabil Ghodbane Date: Mon, 23 Jan 2023 12:29:33 +0000 (+0100) Subject: spns #33457: add packagespy for new SOLVERLAB GUI interface X-Git-Tag: V9_11_0~112 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=870989ac4f4f4cfebe3d998ab5e7f26255f07e1f;p=tools%2Fsat_salome.git spns #33457: add packagespy for new SOLVERLAB GUI interface --- diff --git a/applications/SALOME-master-MPI.pyconf b/applications/SALOME-master-MPI.pyconf index f58d381..1e6a1c6 100644 --- a/applications/SALOME-master-MPI.pyconf +++ b/applications/SALOME-master-MPI.pyconf @@ -96,6 +96,7 @@ APPLICATION : openVKL: '0.11.0' ospray : '2.4.0' packaging : '17.1' + packagespy : '9bb05ac' pandas : '0.25.2' patsy : '0.5.2' ParaView : {tag:'5.11.0', base: 'no', section: 'version_5_11_0_MPI', hpc: 'yes'} diff --git a/applications/SALOME-master-native.pyconf b/applications/SALOME-master-native.pyconf index a08908a..5186a63 100644 --- a/applications/SALOME-master-native.pyconf +++ b/applications/SALOME-master-native.pyconf @@ -94,6 +94,7 @@ APPLICATION : openturns: '1.19' ospray : '2.4.0' packaging : 'native' + packagespy : '9bb05ac' pandas : 'native' ParaView : {tag:'5.11.0', base: 'no', section: 'version_5_11_0_MPI', hpc: 'yes'} PERSALYS: 'v13.0' diff --git a/applications/SALOME-master.pyconf b/applications/SALOME-master.pyconf index 9f53fc3..73f3031 100644 --- a/applications/SALOME-master.pyconf +++ b/applications/SALOME-master.pyconf @@ -96,6 +96,7 @@ APPLICATION : openVKL: '0.11.0' ospray : '2.4.0' packaging : '17.1' + packagespy : '9bb05ac' pandas : '0.25.2' patsy : '0.5.2' ParaView : {tag:'5.11.0', base: 'no', section: 'version_5_11_0_MPI', hpc: 'yes'} diff --git a/products/SOLVERLAB.pyconf b/products/SOLVERLAB.pyconf index 0e1d262..d61c407 100644 --- a/products/SOLVERLAB.pyconf +++ b/products/SOLVERLAB.pyconf @@ -27,7 +27,8 @@ default : 'GUI', 'MEDCOUPLING' ] - build_depend : ["cmake", "swig", "doxygen", "graphviz","cppunit"] + build_depend : ["cmake", "swig", "doxygen", "graphviz","cppunit"] + opt_depend : ['packagespy'] # mscgen source_dir : $APPLICATION.workdir + $VARS.sep + 'SOURCES' + $VARS.sep + $name build_dir : $APPLICATION.workdir + $VARS.sep + 'BUILD' + $VARS.sep + $name diff --git a/products/compil_scripts/omniORB.sh b/products/compil_scripts/omniORB.sh index 8f0c57e..8ede6b0 100755 --- a/products/compil_scripts/omniORB.sh +++ b/products/compil_scripts/omniORB.sh @@ -42,13 +42,12 @@ if version_ge $VERSION "4.1" ; then echo echo "*** fix headers" cd $PRODUCT_INSTALL/bin - pyVersionMajor=python$($PYTHONBIN -c 'import sys; print(".".join(map(str, sys.version_info[0:1])))') if [ $? -ne 0 ]; then - echo ERROR: Failed to extract major Python version - assuming Python version equal to 3... - pyVersionMajor=python3 + echo ERROR: Failed to extract major Python version - assuming Python version equal to 3... + pyVersionMajor=python3 elif [ "${pyVersionMajor}" == "python2" ]; then - pyVersionMajor=python + pyVersionMajor=python fi echo INFO: Python version major: ${pyVersionMajor} sed -e "s%#\!.*python[0-9]*%#\!/usr/bin/env ${pyVersionMajor}%" omniidl > _omniidl diff --git a/products/compil_scripts/packagespy.sh b/products/compil_scripts/packagespy.sh new file mode 100755 index 0000000..2edb32c --- /dev/null +++ b/products/compil_scripts/packagespy.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +echo "##########################################################################" +echo "packagespy" $VERSION +echo "##########################################################################" + +# nothing to be done here, simply copy sources to installation directory +cp -rf $SOURCE_DIR/packagespy $PRODUCT_INSTALL +if [ $? -ne 0 ] +then + echo "ERROR: could not copy to $PRODUCT_INSTALL" + exit 1 +fi +cd $PRODUCT_INSTALL/ +PYTHON=${PYTHONBIN##*/} +grep -rl '#!/usr/bin/env python' . |xargs sed -i "s%#\!/usr/bin/env python/#\!/usr/bin/env ${PYTHON}/g" + +echo +echo "########## END" diff --git a/products/env_scripts/packagespy.py b/products/env_scripts/packagespy.py new file mode 100644 index 0000000..73a4f78 --- /dev/null +++ b/products/env_scripts/packagespy.py @@ -0,0 +1,12 @@ +#!/usr/bin/env python +#-*- coding:utf-8 -*- + +import os +import platform + +def set_env(env, prereq_dir, version): + env.set("PACKAGESPY_ROOT_DIR",prereq_dir) + env.prepend('PYTHONPATH',prereq_dir) + +def set_nativ_env(env): + pass diff --git a/products/packagespy.pyconf b/products/packagespy.pyconf new file mode 100644 index 0000000..f383b6b --- /dev/null +++ b/products/packagespy.pyconf @@ -0,0 +1,25 @@ +default : +{ + name : "packagespy" + build_source : "script" + compil_script : $name + $VARS.scriptExtension + get_source : "archive" + environ : + { + env_script : $name + ".py" + } + patches : [] + 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" + } +} + +version_9bb05ac : +{ + archive_info : {archive_name : "packagespy-9bb05ac.tar.gz"} +}