From 79a81f747e42902658b2e4321fdd38786f0f2a03 Mon Sep 17 00:00:00 2001 From: Guytri KASTANE Date: Mon, 22 Apr 2024 13:29:12 +0200 Subject: [PATCH] spns #29973: config files and compil script for C3PO v2.3 --- applications/SALOME-master-native.pyconf | 2 +- applications/SALOME-master.pyconf | 2 +- products/C3PO.pyconf | 4 +++ products/compil_scripts/C3PO-v2.3.sh | 46 ++++++++++++++++++++++++ 4 files changed, 52 insertions(+), 2 deletions(-) create mode 100755 products/compil_scripts/C3PO-v2.3.sh diff --git a/applications/SALOME-master-native.pyconf b/applications/SALOME-master-native.pyconf index e229573..85180f4 100644 --- a/applications/SALOME-master-native.pyconf +++ b/applications/SALOME-master-native.pyconf @@ -40,7 +40,7 @@ APPLICATION : boost : 'native' CAS : {tag : 'V7_5_3p5', section: 'version_CR753_SALOME_PATCH', base: 'no'} catalyst: '2.0' - C3PO: 'v2.0' + C3PO: 'v2.3' certifi : 'native' cgns : '4.2.0' chardet : 'native' diff --git a/applications/SALOME-master.pyconf b/applications/SALOME-master.pyconf index ae57723..8c2b943 100644 --- a/applications/SALOME-master.pyconf +++ b/applications/SALOME-master.pyconf @@ -41,7 +41,7 @@ APPLICATION : boost : '1.71.0' CAS : {tag : 'V7_5_3p5', section: 'version_CR753_SALOME_PATCH', base: 'no'} catalyst: '2.0' - C3PO: 'v2.0' + C3PO: 'v2.3' certifi : '2018.8.24' cgns : '4.2.0' chardet : '3.0.4' diff --git a/products/C3PO.pyconf b/products/C3PO.pyconf index 4caf277..e6487b4 100644 --- a/products/C3PO.pyconf +++ b/products/C3PO.pyconf @@ -30,6 +30,10 @@ default : patches: [] } +version_v2_3 : +{ + compil_script : "C3PO-v2.3.sh" +} version_v2_0 : { patches: ['C3PO-v2.0.patch'] diff --git a/products/compil_scripts/C3PO-v2.3.sh b/products/compil_scripts/C3PO-v2.3.sh new file mode 100755 index 0000000..32f6a27 --- /dev/null +++ b/products/compil_scripts/C3PO-v2.3.sh @@ -0,0 +1,46 @@ +#!/bin/bash + +echo "##########################################################################" +echo "C3PO $VERSION" +echo "##########################################################################" + +rm -rf "${BUILD_DIR}" +mkdir "${BUILD_DIR}" +cd "${BUILD_DIR}" || { echo "cd ${BUILD_DIR} fails"; exit 1; } +cp -r "${SOURCE_DIR}"/* . + +echo +echo "*** install with ${PYTHONBIN} -m pip install . --prefix=${PRODUCT_INSTALL} --cache-dir=${BUILD_DIR}/cache/pip" +if ! ${PYTHONBIN} -m pip install . --prefix="${PRODUCT_INSTALL}" --cache-dir="${BUILD_DIR}/cache/pip"; then + echo "pip install C3PO fails" + exit 2 +fi + +if [ "${SAT_Python_IS_NATIVE}" == "1" ]; then + PYTEST=$(which pytest) +fi + +if [ "${SAT_Python_IS_NATIVE}" != "1" ] || [ -z "${PYTEST}" ]; then + echo + echo "*** install with $PYTHONBIN -m pip install ${BUILD_DIR}/ext/pytest-8.1.1.tar.gz --cache-dir=${BUILD_DIR}/cache/pip" + if ! ${PYTHONBIN} -m pip install "${BUILD_DIR}/ext/pytest-8.1.1.tar.gz" --prefix="${PRODUCT_INSTALL}" --cache-dir="${BUILD_DIR}/cache/pip"; then + echo "pip install pytest fails" + echo 3 + fi + export PATH="${PRODUCT_INSTALL}/bin":$PATH +fi + +echo +echo "*** running C3PO non-regression tests" +export LD_LIBRARY_PATH="${MEDCOUPLING_ROOT_DIR}/lib:${LD_LIBRARY_PATH}" +export PYTHONPATH="${MEDCOUPLING_ROOT_DIR}/${PYTHON_LIBDIR}:${PYTHONPATH}" +export PYTHONPATH="${MEDCOUPLING_ROOT_DIR}/lib:${PYTHONPATH}" +export PYTHONPATH="${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION}/site-packages:${PYTHONPATH}" + +if ! "${BUILD_DIR}"/run_tests.sh; then + echo "C3PO non-regression tests fails" + exit 3 +fi + +echo +echo "########## END" -- 2.39.2