-
Notifications
You must be signed in to change notification settings - Fork 251
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
Open
kiranNukal
wants to merge
3
commits into
ppc64le:python-ecosystem
Choose a base branch
from
kiranNukal:scipy_1.11.3
base: python-ecosystem
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
#!/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 <[email protected]> | ||
# | ||
# 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..." | ||
# 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 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nikhil-kalbande is it good to add version specific conditions, in build-script?