From 390fa1a8534f53be07951fe86f7d873c6714bbed Mon Sep 17 00:00:00 2001 From: Nabil Ghodbane Date: Fri, 11 Oct 2024 14:35:17 +0200 Subject: [PATCH] spns #43020: more robust implementation of pyqwt --- products/compil_scripts/pyqwt-0.12.1.sh | 24 ++++++++++++++---------- products/salome_system.pyconf | 4 ++-- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/products/compil_scripts/pyqwt-0.12.1.sh b/products/compil_scripts/pyqwt-0.12.1.sh index b8bb44e..c47d43e 100755 --- a/products/compil_scripts/pyqwt-0.12.1.sh +++ b/products/compil_scripts/pyqwt-0.12.1.sh @@ -16,16 +16,7 @@ cd $BUILD_DIR export PYTHONPATH=${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION}/site-packages:$PYTHONPATH export PATH=${PRODUCT_INSTALL}/bin:$PATH -case $LINUX_DISTRIBUTION in - DB10|UB22*) - mkdir -p $PRODUCT_INSTALL/lib/python${PYTHON_VERSION}/site-packages - cp -r $SOURCE_DIR/qwt $PRODUCT_INSTALL/lib/python${PYTHON_VERSION}/site-packages/qwt - ;; - *) - ${PYTHONBIN} -m pip install --cache-dir=$BUILD_DIR/cache/pip $SOURCE_DIR --no-deps --target=$PRODUCT_INSTALL/lib/python${PYTHON_VERSION}/site-packages - ;; -esac - +${PYTHONBIN} -m pip install --cache-dir=$BUILD_DIR/cache/pip $SOURCE_DIR --no-deps --target=$PRODUCT_INSTALL/lib/python${PYTHON_VERSION}/site-packages if [ $? -ne 0 ]; then echo "ERROR: could not install" exit 1 @@ -35,5 +26,18 @@ if [ -d ${PRODUCT_INSTALL}/lib64 ]; then mv ${PRODUCT_INSTALL}/lib64 ${PRODUCT_INSTALL}/lib fi +# strangely on some nodes (e.g DB10, FD36), pip fails to retrieve version - would require to upgrade pip +# In that case, simply copy the qwt, given there is no real compilation involved here. +F=$(ls ${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION}/site-packages|grep UNKNOWN) +if [ $? -eq 0 ]; then + cd ${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION}/site-packages + rm -rf *UNKNOWN* + cp -r $SOURCE_DIR/qwt $PRODUCT_INSTALL/lib/python${PYTHON_VERSION}/site-packages/qwt + if [ $? -ne 0 ]; then + echo "ERROR: could not install" + exit 1 + fi +fi + echo echo "########## END" diff --git a/products/salome_system.pyconf b/products/salome_system.pyconf index dd042de..221ceb3 100644 --- a/products/salome_system.pyconf +++ b/products/salome_system.pyconf @@ -15,11 +15,11 @@ default : "libXi", "libXinerama", "libXmu", "libXpm", "libXrandr", "libXrender", "libXt", "libXtst", "lua", "mesa-libGLU", "ncurses-libs", "nspr", "nss", "nss-softokn-freebl", "nss-util", "openldap", "pango", "pcre", "pixman", "pulseaudio-libs", "pulseaudio-libs-glib2", "readline", "sqlite", "systemd-libs", "tbb", "xz-libs", - "zlib", "tbb"] + "zlib", "tbb", "libXinerama"] rpm_dev : ["openssl-devel", "tbb-devel", "gcc", "make", "sed", "gcc-c++", "expat-devel", "fontconfig-devel", "flex", "bison", "mesa-libGLU-devel", "libxcb-devel", "xcb-util-devel", "libxkbcommon-devel", "libxkbcommon-x11-devel", "bzip2-devel", "libXi-devel", "libXmu-devel", "automake", "libtool", "libjpeg-turbo-devel", "cmake", - "libXpm-devel", "libXft-devel", "sqlite-devel", "libcurl-devel", "libXt-devel", "libXcursor-devel", "tbb-devel"] + "libXpm-devel", "libXft-devel", "sqlite-devel", "libcurl-devel", "libXt-devel", "libXcursor-devel", "tbb-devel", "libXinerama-devel"] apt : ["libbsd0", "libbz2-1.0", "libc6", "libdrm2", "libegl1", "libexif12", "libexpat1", "libfftw3-double3", "libfontconfig1", "libgl1", "libglu1-mesa", "libgomp1", "libgphoto2-6", "libice6", "libjbig0", "libltdl7", "liblzma5", "libnuma1", "libpcre3", "libquadmath0", -- 2.39.2