From 8e9d4d389474f9eaa75ec054b7c90e9bbb6ddaae Mon Sep 17 00:00:00 2001 From: Quentin Cozette Date: Thu, 1 Oct 2020 17:14:03 +0200 Subject: [PATCH] Add the PyQtChart product as a new prerequisite of master configurations (needed by a project which relies on SALOME) --- applications/SALOME-master-MPI.pyconf | 1 + applications/SALOME-master-int64.pyconf | 1 + applications/SALOME-master-windows.pyconf | 1 + applications/SALOME-master.pyconf | 1 + products/PyQtChart.pyconf | 34 ++++++++++++++++++ products/compil_scripts/PyQtChart-5.9.sh | 43 +++++++++++++++++++++++ products/env_scripts/PyQtChart.py | 10 ++++++ 7 files changed, 91 insertions(+) create mode 100644 products/PyQtChart.pyconf create mode 100644 products/compil_scripts/PyQtChart-5.9.sh create mode 100644 products/env_scripts/PyQtChart.py diff --git a/applications/SALOME-master-MPI.pyconf b/applications/SALOME-master-MPI.pyconf index e07e33e..2b1cae8 100644 --- a/applications/SALOME-master-MPI.pyconf +++ b/applications/SALOME-master-MPI.pyconf @@ -80,6 +80,7 @@ APPLICATION : Pygments : '2.0.2' pyparsing : '2.0.3' PyQt : '5.9' + PyQtChart : '5.9' pyreadline : '2.0' Python : '3.6.5' pytz : '2015.7' diff --git a/applications/SALOME-master-int64.pyconf b/applications/SALOME-master-int64.pyconf index c047830..845c393 100644 --- a/applications/SALOME-master-int64.pyconf +++ b/applications/SALOME-master-int64.pyconf @@ -79,6 +79,7 @@ APPLICATION : Pygments : '2.0.2' pyparsing : '2.0.3' PyQt : '5.9' + PyQtChart : '5.9' pyreadline : '2.0' Python : '3.6.5' pytz : '2015.7' diff --git a/applications/SALOME-master-windows.pyconf b/applications/SALOME-master-windows.pyconf index 2fe3d99..7b4344b 100644 --- a/applications/SALOME-master-windows.pyconf +++ b/applications/SALOME-master-windows.pyconf @@ -90,6 +90,7 @@ APPLICATION : Pygments : '2.4.2' pyparsing : '2.4.0' PyQt : '5.9' + PyQtChart : '5.9' pyreadline : '2.1' Python : '3.6.5' pytz : '2019.1' diff --git a/applications/SALOME-master.pyconf b/applications/SALOME-master.pyconf index d4b9567..47de43a 100644 --- a/applications/SALOME-master.pyconf +++ b/applications/SALOME-master.pyconf @@ -78,6 +78,7 @@ APPLICATION : Pygments : '2.0.2' pyparsing : '2.0.3' PyQt : '5.9' + PyQtChart : '5.9' pyreadline : '2.0' Python : '3.6.5' pytz : '2015.7' diff --git a/products/PyQtChart.pyconf b/products/PyQtChart.pyconf new file mode 100644 index 0000000..66fbeb3 --- /dev/null +++ b/products/PyQtChart.pyconf @@ -0,0 +1,34 @@ +default : +{ + name : "PyQtChart" + build_source : "script" + compil_script : 'pip_install' + $VARS.scriptExtension + get_source : "archive" + environ : + { + env_script : $name + ".py" + } + depend : ['Python','setuptools', 'PyQt'] + 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 : "no" + } +} + +version_5_9 : +{ + compil_script : 'PyQtChart-5.9' + $VARS.scriptExtension +} + +default_win : +{ + compil_script : 'pip_install_whl' + $VARS.scriptExtension + archive_info : + { + archive_name : "PyQtChart-" + $APPLICATION.products.PyQtChart + "_windows.tar.gz" + } +} diff --git a/products/compil_scripts/PyQtChart-5.9.sh b/products/compil_scripts/PyQtChart-5.9.sh new file mode 100644 index 0000000..0cd7245 --- /dev/null +++ b/products/compil_scripts/PyQtChart-5.9.sh @@ -0,0 +1,43 @@ +#!/bin/bash + +echo "##########################################################################" +echo "PyQtChart " $VERSION +echo "##########################################################################" + + +mkdir $PRODUCT_INSTALL +cd $PRODUCT_INSTALL +echo "PyQtChart will be installed in PyQt folder..." >> README + +python_name=python$PYTHON_VERSION + +echo `env` + +echo + +cp -f $SOURCE_DIR/PyQt5/QtChart.so ${PYQT5_ROOT_DIR}/lib/python${PYTHON_VERSION}/site-packages/PyQt5/QtChart.so +if [ $? -ne 0 ] +then + echo "ERROR: could not copy QtCharts.so" + exit 1 +fi + +# useless - use the Qt one +rm -rf ${PYQT5_ROOT_DIR}/lib/python${PYTHON_VERSION}/site-packages/PyQt5/Qt +cp -r $SOURCE_DIR/PyQt5/Qt ${PYQT5_ROOT_DIR}/lib/python${PYTHON_VERSION}/site-packages/PyQt5/Qt +if [ $? -ne 0 ] +then + echo "ERROR: could not copy Qt" + exit 2 +fi + +rm -f ${PYQT5_ROOT_DIR}/lib/python${PYTHON_VERSION}/site-packages/PyQt5/Qt/lib/libQt5Charts.so.5 +if [ $? -ne 0 ] +then + echo "ERROR: could not remove Qt/libQt5Charts.so.5" + exit 3 +fi + +echo +echo "########## END" + diff --git a/products/env_scripts/PyQtChart.py b/products/env_scripts/PyQtChart.py new file mode 100644 index 0000000..67fbc52 --- /dev/null +++ b/products/env_scripts/PyQtChart.py @@ -0,0 +1,10 @@ +#!/usr/bin/env python +#-*- coding:utf-8 -*- + +import os.path + +def set_env(env, prereq_dir, version): + pyver = 'python' + env.get('PYTHON_VERSION') + env.set('PYQTCHART_ROOT_DIR', prereq_dir) +def set_nativ_env(env): + pass -- 2.39.2