From 3afe280c0d0bda551da90741ac584e870eafedc1 Mon Sep 17 00:00:00 2001 From: kiranNukal <sai.kiran.nukala@ibm.com> Date: Mon, 27 Jan 2025 20:40:15 +0530 Subject: [PATCH 1/4] Update build_info.json --- s/scipy/build_info.json | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/s/scipy/build_info.json b/s/scipy/build_info.json index ecfd6398ce..2fe3ed42fa 100644 --- a/s/scipy/build_info.json +++ b/s/scipy/build_info.json @@ -5,15 +5,18 @@ "version": "v1.10.1", "wheel_build" : true, "default_branch": "main", - "build_script": "scipy_v1.10.1_ubi_9.3.sh", + "build_script": "scipy_ubi_9.3.sh", "package_dir": "s/scipy", "docker_build": false, "validate_build_script": true, "use_non_root_user": false, - "*": { + "v1.10.1": { "build_script": "scipy_v1.10.1_ubi_9.3.sh" }, - "v*.*.*": { + "v1.11.3": { + "build_script": "scipy_v1.11.3_ubi_9.3.sh" + }, + "*": { "build_script": "scipy_ubi_9.3.sh" } } From 20c3ac69905afdc0e1f1159321f837c088447612 Mon Sep 17 00:00:00 2001 From: kiranNukal <sai.kiran.nukala@ibm.com> Date: Mon, 27 Jan 2025 20:40:46 +0530 Subject: [PATCH 2/4] Create scipy_v1.11.3_ubi_9.3.sh --- s/scipy/scipy_v1.11.3_ubi_9.3.sh | 77 ++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 s/scipy/scipy_v1.11.3_ubi_9.3.sh diff --git a/s/scipy/scipy_v1.11.3_ubi_9.3.sh b/s/scipy/scipy_v1.11.3_ubi_9.3.sh new file mode 100644 index 0000000000..f5a761586f --- /dev/null +++ b/s/scipy/scipy_v1.11.3_ubi_9.3.sh @@ -0,0 +1,77 @@ +#!/bin/bash -e +# ----------------------------------------------------------------------------- +# +# Package : scipy +# Version : v1.11.3 +# Source repo : https://github.com/scipy/scipy +# Tested on : UBI 9.3 +# Language : Python, C, Fortran, C++, Cython, Meson +# Travis-Check : True +# Script License: Apache License, Version 2 or later +# Maintainer : Sai Kiran Nukala <sai.kiran.nukala@ibm.com> +# +# Disclaimer: This script has been tested in root mode on given +# ========== platform using the mentioned version of the package. +# It may not work as expected with newer versions of the +# package and/or distribution. In such case, please +# contact "Maintainer" of this script. +# +# ---------------------------------------------------------------------------- + +PACKAGE_NAME=scipy +PACKAGE_VERSION=${1:-v1.11.3} +PACKAGE_URL=https://github.com/scipy/scipy + +echo "Installing core dependencies..." +# install core dependencies +yum install -y gcc gcc-c++ gcc-fortran pkg-config openblas-devel python python3-pip python3 python3-devel git atlas +echo "Core dependencies installed." + +echo "Installing scipy dependencies and build-setup dependencies..." +# install scipy dependency (numpy wheel gets built and installed) and build-setup dependencies +pip install meson 'wheel<0.39.0' beniget==0.4.0 pythran==0.12.1 pyproject_metadata==0.8.1 'pybind11>=2.10.4' gast==0.5.0 meson-python ninja numpy==1.21.6 'setuptools<60.0' Cython==0.29.37 'meson-python<0.13.0,>=0.11.0' 'patchelf>=0.11.0' pooch pytest build +pip3 install doit click rich_click pydevtool +echo "Dependencies installed." + +echo "Cloning source repository..." +# clone source repository +git clone $PACKAGE_URL +cd $PACKAGE_NAME +git checkout $PACKAGE_VERSION +git submodule update --init +echo "Source repository cloned and checked out to version $PACKAGE_VERSION." + +echo "Building and installing $PACKAGE_NAME..." +# issue: https://github.com/scipy/scipy/issues/21100#issuecomment-2538514333 +if [[ $PACKAGE_VERSION == "v1.11.3" ]] && [[ $(git diff pyproject.toml | wc -l) -eq 0 ]]; then + sed -i \ + -e 's/"pythran>=0.12.0,<0.13.0"/"pythran==0.12.1"/g' \ + -e '/"pythran==0.12.1",/a "pyproject_metadata==0.8.1",' \ + -e '/"pythran==0.12.1",/a "gast==0.5.0",' \ + -e '/"pythran==0.12.1",/a "beniget==0.4.0",' pyproject.toml +fi +# build and install +if ! pip install .; then + echo "------------------$PACKAGE_NAME:Install_fails-------------------------------------" + echo "$PACKAGE_URL $PACKAGE_NAME" + echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | GitHub | Fail | Install_Fails" + exit 1 +fi +echo "Build and installation completed successfully." + +echo "Running specific tests using pytest..." +# run specific tests using pytest +# The `--import-mode=importlib` option is used to resolve import path conflicts +# that arise due to multiple instances of the same module being found in different locations. +pip3 install pytest==6.2.5 +if ! (pytest --import-mode=importlib scipy/linalg/tests/test_basic.py); then + echo "------------------$PACKAGE_NAME::Test_Fail-------------------------" + echo "$PACKAGE_VERSION $PACKAGE_NAME" + echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | Fail | Test_Fail" + exit 2 +else + echo "------------------$PACKAGE_NAME::Test_Pass---------------------" + echo "$PACKAGE_VERSION $PACKAGE_NAME" + echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | Pass | Test_Success" + exit 0 +fi From 5255667652cdefda47afc0ae1bb8e7b05cabf5d8 Mon Sep 17 00:00:00 2001 From: kiranNukal <sai.kiran.nukala@ibm.com> Date: Wed, 5 Feb 2025 09:42:57 +0530 Subject: [PATCH 3/4] Update scipy_v1.11.3_ubi_9.3.sh --- s/scipy/scipy_v1.11.3_ubi_9.3.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/s/scipy/scipy_v1.11.3_ubi_9.3.sh b/s/scipy/scipy_v1.11.3_ubi_9.3.sh index f5a761586f..89fd9fca07 100644 --- a/s/scipy/scipy_v1.11.3_ubi_9.3.sh +++ b/s/scipy/scipy_v1.11.3_ubi_9.3.sh @@ -21,7 +21,8 @@ PACKAGE_NAME=scipy PACKAGE_VERSION=${1:-v1.11.3} PACKAGE_URL=https://github.com/scipy/scipy - +PACKAGE_DIR=scipy + echo "Installing core dependencies..." # install core dependencies yum install -y gcc gcc-c++ gcc-fortran pkg-config openblas-devel python python3-pip python3 python3-devel git atlas From fab7b691ce827a8038b0bebbb5279242cfc065e3 Mon Sep 17 00:00:00 2001 From: kiranNukal <sai.kiran.nukala@ibm.com> Date: Fri, 14 Feb 2025 08:04:06 +0530 Subject: [PATCH 4/4] Update scipy_v1.11.3_ubi_9.3.sh --- s/scipy/scipy_v1.11.3_ubi_9.3.sh | 8 -------- 1 file changed, 8 deletions(-) diff --git a/s/scipy/scipy_v1.11.3_ubi_9.3.sh b/s/scipy/scipy_v1.11.3_ubi_9.3.sh index 89fd9fca07..215d9b455d 100644 --- a/s/scipy/scipy_v1.11.3_ubi_9.3.sh +++ b/s/scipy/scipy_v1.11.3_ubi_9.3.sh @@ -43,14 +43,6 @@ git submodule update --init echo "Source repository cloned and checked out to version $PACKAGE_VERSION." echo "Building and installing $PACKAGE_NAME..." -# issue: https://github.com/scipy/scipy/issues/21100#issuecomment-2538514333 -if [[ $PACKAGE_VERSION == "v1.11.3" ]] && [[ $(git diff pyproject.toml | wc -l) -eq 0 ]]; then - sed -i \ - -e 's/"pythran>=0.12.0,<0.13.0"/"pythran==0.12.1"/g' \ - -e '/"pythran==0.12.1",/a "pyproject_metadata==0.8.1",' \ - -e '/"pythran==0.12.1",/a "gast==0.5.0",' \ - -e '/"pythran==0.12.1",/a "beniget==0.4.0",' pyproject.toml -fi # build and install if ! pip install .; then echo "------------------$PACKAGE_NAME:Install_fails-------------------------------------"