From 446e8f0e14ecf1efac1bc64cbe4f54335bc5fc66 Mon Sep 17 00:00:00 2001 From: Nabil Ghodbane Date: Mon, 16 May 2022 14:06:20 +0200 Subject: [PATCH] C3PO: bug fix --- products/compil_scripts/C3PO.sh | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/products/compil_scripts/C3PO.sh b/products/compil_scripts/C3PO.sh index a74e9dc..5a3a503 100755 --- a/products/compil_scripts/C3PO.sh +++ b/products/compil_scripts/C3PO.sh @@ -4,8 +4,10 @@ echo "########################################################################## echo "C3PO" $VERSION echo "##########################################################################" -echo "*** build in SOURCE directory" -cd $SOURCE_DIR +rm -rf $BUILD_DIR +mkdir $BUILD_DIR +cd $BUILD_DIR +cp -r $SOURCE_DIR/* . mkdir -p $PRODUCT_INSTALL/lib/python${PYTHON_VERSION:0:3}/site-packages export PATH=${PRODUCT_INSTALL}/bin:$PATH @@ -14,18 +16,26 @@ export PYTHONPATH=${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION:0:3}/site-packag echo echo "*** build and install with $PYTHONBIN sources/setup.py install --prefix=$PRODUCT_INSTALL" -$PYTHONBIN sources/setup.py install --prefix=$PRODUCT_INSTALL +cd sources +$PYTHONBIN ./setup.py build if [ $? -ne 0 ] then - echo "ERROR on build/install" + echo "ERROR on build" exit 3 fi -cd $SOURCE_DIR + +$PYTHONBIN ./setup.py install --prefix=$PRODUCT_INSTALL +if [ $? -ne 0 ] +then + echo "ERROR on install" + exit 4 +fi 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="${MEDCOUPLING_ROOT_DIR}/bin:${PYTHONPATH}" +cd $BUILD_DIR if [ -n "$MPI_ROOT_DIR" ]; then ctest . else -- 2.39.2