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: Added build_script and build_info.json for numexpr #5542

Open
wants to merge 26 commits into
base: python-ecosystem
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
689d426
changes in build_script_python.sh for auto PR
atongse Dec 20, 2024
8d922ef
Conflict resolve
shubham-dayma-ibm Jan 28, 2025
1f0e8a7
Merge remote-tracking branch 'upstream/python-ecosystem' into python-…
shubham-dayma-ibm Jan 28, 2025
943580b
Merge remote-tracking branch 'upstream/python-ecosystem' into python-…
Feb 4, 2025
ab1426c
Merge remote-tracking branch 'upstream/python-ecosystem' into python-…
Feb 4, 2025
e4a983a
Merge remote-tracking branch 'upstream/python-ecosystem' into python-…
Feb 7, 2025
deb93bc
Merge remote-tracking branch 'upstream/python-ecosystem' into python-…
Feb 10, 2025
3b9c181
Merge remote-tracking branch 'upstream/python-ecosystem' into python-…
Feb 11, 2025
3a49874
Merge remote-tracking branch 'upstream/python-ecosystem' into python-…
Feb 12, 2025
bbebbee
Merge remote-tracking branch 'upstream/python-ecosystem' into python-…
Feb 12, 2025
2c6b8ea
Merge remote-tracking branch 'upstream/python-ecosystem' into python-…
Feb 13, 2025
74935dd
Merge remote-tracking branch 'upstream/python-ecosystem' into python-…
Feb 17, 2025
fdbce27
Merge remote-tracking branch 'upstream/python-ecosystem' into python-…
Feb 18, 2025
c046375
Merge remote-tracking branch 'upstream/python-ecosystem' into python-…
Feb 18, 2025
82db794
Merge remote-tracking branch 'upstream/python-ecosystem' into python-…
Feb 18, 2025
a1180b7
Merge remote-tracking branch 'upstream/python-ecosystem' into python-…
Feb 20, 2025
413aae1
Merge remote-tracking branch 'upstream/python-ecosystem' into python-…
Feb 20, 2025
cb66c4c
Merge remote-tracking branch 'upstream/python-ecosystem' into python-…
Feb 26, 2025
f78f7d1
Merge remote-tracking branch 'upstream/python-ecosystem' into python-…
Feb 26, 2025
ff20475
Merge remote-tracking branch 'upstream/python-ecosystem' into python-…
Feb 27, 2025
dbdc731
Merge remote-tracking branch 'upstream/python-ecosystem' into python-…
Feb 27, 2025
4ebf59d
Merge remote-tracking branch 'upstream/python-ecosystem' into python-…
Feb 28, 2025
9c6ce52
Merge remote-tracking branch 'upstream/python-ecosystem' into python-…
Feb 28, 2025
5172cf0
Merge remote-tracking branch 'upstream/python-ecosystem' into python-…
Feb 28, 2025
fd0d1a7
Merge remote-tracking branch 'upstream/python-ecosystem' into python-…
Mar 5, 2025
7eab90c
Added build_script and Build_info.json using automation for numexpr
Mar 7, 2025
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
30 changes: 12 additions & 18 deletions n/numexpr/build_info.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,13 @@
{
"maintainer": "vinodk99",
"package_name": "numexpr",
"github_url": "https://github.com/pydata/numexpr.git",
"version": "v2.10.2",
"wheel_build" : true,
"package_dir": "n/numexpr",
"default_branch": "master",
"build_script": "numexpr_ubi_9.3.sh",
"docker_build": false,
"validate_build_script": true,
"use_non_root_user": "false",
"v2.8.2": {
"build_script":"numexpr_ubi_9.3.sh"
},
"*": {
"build_script":"numexpr_2.10.2_ubi_9.3.sh"
}
}
"maintainer": "shubham-dayma-ibm",
"package_name": "numexpr",
"github_url": "https://github.com/pydata/numexpr.git",
"version": "v2.10.2",
"default_branch": "master",
"build_script": "numexpr_2.10.2_ubi_9.3.sh",
"package_dir": "n/numexpr",
"docker_build": false,
"wheel_build": true,
"validate_build_script": true,
"use_non_root_user": false
}
126 changes: 95 additions & 31 deletions n/numexpr/numexpr_ubi_9.3.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#!/bin/bash -e
# ----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
#
# Package : numexpr
# Version : v2.8.4
# Source repo : https://github.com/pydata/numexpr.git
# Tested on : UBI:9.3
# Package : numexpr
# Version : v2.8.7
# Source repo : https://github.com/pydata/numexpr.git
# Tested on : UBI:9.3
# Language : Python
# Travis-Check : True
# Script License: Apache License, Version 2 or later
# Maintainer : Haritha Nagothu <haritha.nagothu2@ibm.com>
# Maintainer : ICH <shubham-dayma-ibm>
#
# Disclaimer: This script has been tested in root mode on given
# ========== platform using the mentioned version of the package.
Expand All @@ -18,42 +18,106 @@
#
# ----------------------------------------------------------------------------

#variables
PACKAGE_NAME=numexpr
PACKAGE_VERSION=${1:-v2.8.4}
PACKAGE_VERSION=${1:-v2.8.7}
PACKAGE_URL=https://github.com/pydata/numexpr.git
PACKAGE_DIR=numexpr

# Install dependencies and tools.
yum install -y git gcc gcc-c++ make wget openssl-devel python-devel bzip2-devel libffi-devel wget xz zlib-devel cmake openblas-devel
yum install -y git python3 python3-devel.ppc64le gcc gcc-c++ make wget sudo cmake
pip3 install pytest tox nox
PATH=$PATH:/usr/local/bin/

#clone repository
git clone $PACKAGE_URL
cd $PACKAGE_NAME
git checkout $PACKAGE_VERSION
OS_NAME=$(cat /etc/os-release | grep ^PRETTY_NAME | cut -d= -f2)
SOURCE=Github

#install pytest
pip install pytest
# Install rust
if ! command -v rustc &> /dev/null
then
wget https://static.rust-lang.org/dist/rust-1.75.0-powerpc64le-unknown-linux-gnu.tar.gz
tar -xzf rust-1.75.0-powerpc64le-unknown-linux-gnu.tar.gz
cd rust-1.75.0-powerpc64le-unknown-linux-gnu
sudo ./install.sh
export PATH=$HOME/.cargo/bin:$PATH
rustc -V
cargo -V
cd ../
fi

pip install numpy==1.26.3
pip install -e .
if [[ "$PACKAGE_URL" == *github.com* ]]; then
# Use git clone if it's a Git repository
if [ -d "$PACKAGE_DIR" ]; then
cd "$PACKAGE_DIR" || exit
else
if ! git clone "$PACKAGE_URL" "$PACKAGE_DIR"; then
echo "------------------$PACKAGE_NAME:clone_fails---------------------------------------"
echo "$PACKAGE_URL $PACKAGE_NAME"
echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | $OS_NAME | $SOURCE | Fail | Clone_Fails"
exit 1
fi
cd "$PACKAGE_DIR" || exit
git checkout "$PACKAGE_VERSION" || exit
fi
else
# If it's not a Git repository, download and untar
if [ -d "$PACKAGE_DIR" ]; then
cd "$PACKAGE_DIR" || exit
else
# Use download and untar if it's not a Git repository
if ! curl -L "$PACKAGE_URL" -o "$PACKAGE_DIR.tar.gz"; then
echo "------------------$PACKAGE_URL:download_fails---------------------------------------"
echo "$PACKAGE_URL $PACKAGE_NAME"
echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | $OS_NAME | $SOURCE | Fail | Download_Fails"
exit 1
fi
mkdir "$PACKAGE_DIR"

#install
if ! (python3 setup.py install) ; then
echo "------------------$PACKAGE_NAME:Install_fails-------------------------------------"
if ! tar -xzf "$PACKAGE_DIR.tar.gz" -C "$PACKAGE_DIR" --strip-components=1; then
echo "------------------$PACKAGE_NAME:untar_fails---------------------------------------"
echo "$PACKAGE_URL $PACKAGE_NAME"
echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | $OS_NAME | $SOURCE | Fail | Untar_Fails"
exit 1
fi

cd "$PACKAGE_DIR" || exit
fi
fi

# Install via pip3
if ! python3 -m pip install ./; then
echo "------------------$PACKAGE_NAME:install_fails------------------------"
echo "$PACKAGE_URL $PACKAGE_NAME"
echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | $OS_NAME | $SOURCE | Fail | Install_Failed"
exit 1
fi

# Run Tox
python3 -m tox -e py39
if [ $? -eq 0 ]; then
echo "------------------$PACKAGE_NAME:install_and_test_both_success-------------------------"
echo "$PACKAGE_URL $PACKAGE_NAME"
echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | GitHub | Fail | Install_Fails"
exit 1
echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | $OS_NAME | $SOURCE | Pass | Both_Install_and_Test_Success"
exit 0
fi

#test
if ! pytest; then
echo "--------------------$PACKAGE_NAME:Install_success_but_test_fails---------------------"
# Run Pytest
python3 -m pytest
if [ $? -eq 0 ]; then
echo "------------------$PACKAGE_NAME:install_and_test_both_success-------------------------"
echo "$PACKAGE_URL $PACKAGE_NAME"
echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | GitHub | Fail | Install_success_but_test_Fails"
exit 2
else
echo "------------------$PACKAGE_NAME:Install_&_test_both_success-------------------------"
echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | $OS_NAME | $SOURCE | Pass | Both_Install_and_Test_Success"
exit 0
fi

# Run Nox
python3 -m nox
if [ $? -eq 0 ]; then
echo "------------------$PACKAGE_NAME:install_and_test_both_success-------------------------"
echo "$PACKAGE_URL $PACKAGE_NAME"
echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | GitHub | Pass | Both_Install_and_Test_Success"
echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | $OS_NAME | $SOURCE | Pass | Both_Install_and_Test_Success"
exit 0
else
echo "------------------$PACKAGE_NAME:install_success_but_test_fails---------------------"
echo "$PACKAGE_URL $PACKAGE_NAME"
echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | $OS_NAME | $SOURCE | Fail | Install_success_but_test_Fails"
exit 2
fi