From 5bdef54aa3a94742f34cb81aa34f6efb3be7baa3 Mon Sep 17 00:00:00 2001 From: Tejas Badjate Date: Tue, 1 Sep 2026 16:04:46 +0530 Subject: [PATCH] added script to support UBI10.2 and python3.14 env --- b/bottleneck/bottleneck_ubi_10.2.sh | 82 +++++++++++++++++++++++++++++ b/bottleneck/build_info.json | 35 ++++++------ 2 files changed, 101 insertions(+), 16 deletions(-) create mode 100644 b/bottleneck/bottleneck_ubi_10.2.sh diff --git a/b/bottleneck/bottleneck_ubi_10.2.sh b/b/bottleneck/bottleneck_ubi_10.2.sh new file mode 100644 index 0000000000..9760ff76d9 --- /dev/null +++ b/b/bottleneck/bottleneck_ubi_10.2.sh @@ -0,0 +1,82 @@ +#!/bin/bash -e +# ---------------------------------------------------------------------------- +# +# Package : bottleneck +# Version : v1.6.0 +# Source repo : https://github.com/pydata/bottleneck.git +# Tested on : UBI:10.2 +# Language : Python +# Ci-Check : True +# Script License: Apache License, Version 2 or later +# Maintainer : tejasBadjateIBM +# +# 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. +# +# ---------------------------------------------------------------------------- + +#variables +PACKAGE_NAME=bottleneck +PACKAGE_VERSION=${1:-v1.6.0} +PACKAGE_URL=https://github.com/pydata/bottleneck.git + +# Install dependencies and tools. +yum install -y wget git make python3.14 python3.14-pip python3.14-devel openssl-devel + +yum install gcc-toolset-15 gcc-toolset-15-gcc gcc-toolset-15-gcc-c++ gcc-toolset-15-gcc-gfortran -y + +# --------------------------------------------------------------------------- +# Activate GCC Toolset 15 (SCL removed in UBI 10 — use PATH export) +# --------------------------------------------------------------------------- +if [[ -f /opt/rh/gcc-toolset-15/enable ]]; then + source /opt/rh/gcc-toolset-15/enable +elif [[ -d /opt/rh/gcc-toolset-15/root/usr/bin ]]; then + export PATH="/opt/rh/gcc-toolset-15/root/usr/bin:$PATH" + export LD_LIBRARY_PATH="/opt/rh/gcc-toolset-15/root/usr/lib64:$LD_LIBRARY_PATH" +else + echo "ERROR: gcc-toolset-15 not found" + exit 1 +fi + +export PATH="/opt/rh/gcc-toolset-15/root/usr/bin:$PATH" +export LD_LIBRARY_PATH="/opt/rh/gcc-toolset-15/root/usr/lib64:${LD_LIBRARY_PATH:-}" + +export CC="/opt/rh/gcc-toolset-15/root/usr/bin/gcc" +export CXX="/opt/rh/gcc-toolset-15/root/usr/bin/g++" + + +#clone repository +git clone $PACKAGE_URL +cd $PACKAGE_NAME +git checkout $PACKAGE_VERSION + +#install +if ! (python3.14 -m 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 + +python3.14 -m pip install versioneer numpy==2.5.0 +python3.14 -m pip install chardet --upgrade +python3.14 -m pip install requests --upgrade +python3.14 -m pip install tox +python3.14 -m pip install pytest hypothesis + +# test +cd .. +if ! python3.14 -c "import bottleneck; bottleneck.test()"; then + echo "--------------------$PACKAGE_NAME:Install_success_but_test_fails---------------------" + 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_URL $PACKAGE_NAME" + echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | GitHub | Pass | Both_Install_and_Test_Success" + exit 0 +fi \ No newline at end of file diff --git a/b/bottleneck/build_info.json b/b/bottleneck/build_info.json index 9f866d6f71..d84451f721 100644 --- a/b/bottleneck/build_info.json +++ b/b/bottleneck/build_info.json @@ -1,16 +1,19 @@ -{ - "maintainer": "Shivansh-ibm", - "package_name": "bottleneck", - "github_url": "https://github.com/pydata/bottleneck", - "version": "v1.6.0", - "default_branch": "master", - "package_dir": "b/bottleneck", - "build_script": "bottleneck_1.3.5_ubi_9.3.sh", - "wheel_build" : true, - "docker_build": false, - "validate_build_script": true, - "use_non_root_user": false, - "v1.*.*": { - "build_script": "bottleneck_1.3.5_ubi_9.3.sh" - } -} +{ + "maintainer": "tejasBadjateIBM", + "package_name": "bottleneck", + "github_url": "https://github.com/pydata/bottleneck", + "version": "v1.6.0", + "default_branch": "master", + "package_dir": "b/bottleneck", + "build_script": "bottleneck_ubi_10.2.sh", + "wheel_build" : true, + "docker_build": false, + "validate_build_script": true, + "use_non_root_user": false, + "v1.*.*": { + "build_script": [ + "bottleneck_1.3.5_ubi_9.3.sh", + "bottleneck_ubi_10.2.sh" + ] + } +}