From 6961fbef2e13131df8ed89d10a9ea7549b9eeaab Mon Sep 17 00:00:00 2001 From: Guytri KASTANE Date: Tue, 22 Oct 2024 16:27:14 +0200 Subject: [PATCH] bos #43318: fix used scikit-learn version for native node --- products/compil_scripts/openturns-1.23.sh | 29 +++++++++++++++++------ 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/products/compil_scripts/openturns-1.23.sh b/products/compil_scripts/openturns-1.23.sh index ee9a1f9..d3c0572 100755 --- a/products/compil_scripts/openturns-1.23.sh +++ b/products/compil_scripts/openturns-1.23.sh @@ -354,17 +354,36 @@ if [[ -d "$SOURCE_DIR/otfftw-0.15" ]]; then exit 6 fi elif [ $k == "otpod" ]; then - if [[ $DIST_NAME == "CO" && $DIST_VERSION == "8" ]]; then + if [[ $DIST_NAME == "CO" && $DIST_VERSION == "8" && $SAT_Cython_IS_NATIVE == "1" ]]; then echo "*** skipping: since system Cython too old" continue fi + if [ "${LINUX_DISTRIBUTION}" != "DB10" ]; then echo "INFO: install scikit-learn-1.2.2" - ${PYTHONBIN} -m pip install --cache-dir=$BUILD_DIR/cache/pip $SOURCE_DIR/scikit-learn-1.2.2/scikit-learn-1.2.2.tar.gz --no-deps --prefix=$PRODUCT_INSTALL --no-build-isolation --no-use-pep517 + if [ "${PYTHON_VERSION}" == "3.12" ]; then + ${PYTHONBIN} -m pip install --cache-dir=$BUILD_DIR/cache/pip $SOURCE_DIR/scikit-learn-1.2.2/scikit-learn-1.2.2.tar.gz --no-deps --prefix=$PRODUCT_INSTALL --no-build-isolation --no-use-pep517 + if [ $? -ne 0 ] + then + echo "FATAL: could not install scikit-1.2.2" + exit 6 + fi + else + ${PYTHONBIN} -m pip install --cache-dir=$BUILD_DIR/cache/pip $SOURCE_DIR/scikit-learn-1.2.2/scikit_learn-1.2.2-cp${PYTHON_VERSION//./}-cp${PYTHON_VERSION//./}-manylinux_2_17_x86_64.manylinux2014_x86_64.whl --no-deps --prefix=$PRODUCT_INSTALL + fi if [ $? -ne 0 ] then echo "FATAL: could not install scikit-1.2.2" exit 6 fi + else + echo "INFO: install scikit-learn-1.0" + ${PYTHONBIN} -m pip install --cache-dir=$BUILD_DIR/cache/pip $SOURCE_DIR/scikit-learn-1.0/scikit-learn-1.0.tar.gz --no-deps --prefix=$PRODUCT_INSTALL --no-build-isolation --no-use-pep517 + if [ $? -ne 0 ] + then + echo "FATAL: could not install scikit-1.0" + exit 6 + fi + fi echo "INFO: install threadpoolctl-3.0.0" ${PYTHONBIN} -m pip install --cache-dir=$BUILD_DIR/cache/pip $SOURCE_DIR/threadpoolctl-3.0.0/threadpoolctl-3.0.0-py3-none-any.whl --no-deps --prefix=$PRODUCT_INSTALL if [ $? -ne 0 ] @@ -439,11 +458,7 @@ if [[ -d "$SOURCE_DIR/otfftw-0.15" ]]; then fi elif [ "${PYTHON_VERSION}" == "3.9" ]; then echo "INFO: install scikit-learn-1.2.2" - if [ -n "$SAT_HPC" ] && [ -n "$MPI_ROOT_DIR" ]; then - ${PYTHONBIN} -m pip install --cache-dir=$BUILD_DIR/cache/pip $SOURCE_DIR/scikit-learn-1.2.2/scikit_learn-1.2.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl --no-deps - else - ${PYTHONBIN} -m pip install --cache-dir=$BUILD_DIR/cache/pip $SOURCE_DIR/scikit-learn-1.2.2/scikit-learn-1.2.2.tar.gz --no-deps - fi + ${PYTHONBIN} -m pip install --cache-dir=$BUILD_DIR/cache/pip $SOURCE_DIR/scikit-learn-1.2.2/scikit_learn-1.2.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl --no-deps if [ $? -ne 0 ] then echo "FATAL: could not install scikit-1.2.2" -- 2.39.2