Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Currency: created build_script for Scipy v1.11.3 #5361

Merged
merged 4 commits into from
Feb 14, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions s/scipy/build_info.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
70 changes: 70 additions & 0 deletions s/scipy/scipy_v1.11.3_ubi_9.3.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
#!/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
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
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..."
# 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