diff --git a/n/numba/build_info.json b/n/numba/build_info.json index f207a44f3a..f1716dabdf 100644 --- a/n/numba/build_info.json +++ b/n/numba/build_info.json @@ -1,11 +1,11 @@ { - "maintainer": "SakshiJain0302", + "maintainer": "Amit Kumar", "package_name": "numba", "github_url": "https://github.com/numba/numba", - "version": "0.67.0", + "version": "0.65.1", "wheel_build": true, "default_branch": "main", - "build_script": "numba_ubi_10.2.sh", + "build_script": "numba_0.65.1_ubi_10.2.sh", "package_dir": "n/numba", "validate_build_script": true, "use_non_root_user": false, @@ -28,6 +28,9 @@ "0.67.*": { "build_script": "numba_ubi_10.2.sh" }, + "0.65.*": { + "build_script": "numba_0.65.1_ubi_10.2.sh" + }, "*": { "build_script": "numba_0.64.0_ubi_9.3.sh" } diff --git a/n/numba/numba_0.65.1_ubi_10.2.sh b/n/numba/numba_0.65.1_ubi_10.2.sh new file mode 100644 index 0000000000..bf5e0c5e9f --- /dev/null +++ b/n/numba/numba_0.65.1_ubi_10.2.sh @@ -0,0 +1,172 @@ +#!/bin/bash -e +# ----------------------------------------------------------------------------- +# +# Package : numba +# Version : 0.65.1 +# Source repo : https://github.com/numba/numba +# Tested on : UBI 10.2 +# Language : Python +# Ci-Check : True +# Script License: Apache License, Version 2 or later +# Maintainer : Amit Kumar +# +# Disclaimer: This script has been tested in root mode on the 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=numba +PACKAGE_VERSION=${1:-"0.65.1"} +PACKAGE_URL=https://github.com/numba/numba +PACKAGE_DIR=numba +WORKING_DIR=$(pwd) +OS_NAME=$(grep ^PRETTY_NAME /etc/os-release | cut -d= -f2) + +LLVMLITE_VERSION="0.47.0" +NUMPY_VERSION="2.4.6" +DEVFIRST_INDEX="https://wheels.developerfirst.ibm.com/ppc64le/linux/+simple/" + +# ----------------------------------------------------------------------------- +# CPU optimization flags +# ----------------------------------------------------------------------------- +if grep -q "POWER10" /proc/cpuinfo 2>/dev/null; then + CPU_FLAGS="-mcpu=power10 -mtune=power10" + echo "Detected POWER10 - applying power10 optimization flags" +else + CPU_FLAGS="" + echo "POWER10 not detected - no arch-specific flags applied" +fi + +export CFLAGS="${CPU_FLAGS}" +export CXXFLAGS="${CPU_FLAGS}" + +# ----------------------------------------------------------------------------- +# System dependencies +# ----------------------------------------------------------------------------- +yum install -y wget git gcc gcc-c++ \ + python3-pip python3-devel \ + libffi-devel openssl-devel bzip2-devel xz-devel zlib-devel + +gcc --version +g++ --version + +python3 --version +python3 -m pip install --upgrade pip +python3 -m pip install setuptools wheel build auditwheel patchelf + +# ----------------------------------------------------------------------------- +# Install numpy and llvmlite +# ----------------------------------------------------------------------------- +echo "-------------------Installing numpy and llvmlite from DevFirst portal----------------------" +if ! python3 -m pip install \ + --index-url "${DEVFIRST_INDEX}" \ + "numpy==${NUMPY_VERSION}" \ + "llvmlite==${LLVMLITE_VERSION}"; then + echo "------------------numpy/llvmlite:install_fails---------------------------------------" + echo "$PACKAGE_NAME | ${DEVFIRST_INDEX} | $OS_NAME | GitHub | Fail | Install_Fails" + exit 1 +fi +echo "-------------------numpy and llvmlite installed successfully----------------------" + +# ----------------------------------------------------------------------------- +# Clone numba +# ----------------------------------------------------------------------------- +echo "-------------------Building numba ${PACKAGE_VERSION} wheel----------------------" + +rm -rf "$PACKAGE_DIR" +if ! git clone --depth 1 --branch "$PACKAGE_VERSION" "$PACKAGE_URL" "$PACKAGE_DIR"; then + echo "------------------$PACKAGE_NAME:clone_fails---------------------------------------" + echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | $OS_NAME | GitHub | Fail | Clone_Fails" + exit 1 +fi + +cd "$PACKAGE_DIR" + +# ----------------------------------------------------------------------------- +# Build numba wheel +# ----------------------------------------------------------------------------- +if ! python3 -m build --wheel --no-isolation; then + echo "------------------$PACKAGE_NAME:build_fails---------------------------------------" + echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | $OS_NAME | GitHub | Fail | Build_Fails" + exit 1 +fi +cd "$WORKING_DIR" +echo "-------------------numba wheel built successfully----------------------" + +# ----------------------------------------------------------------------------- +# Repair numba wheel with auditwheel - bundles all non-system shared libraries +# (.so files) into the wheel and retags it as manylinux. +# ----------------------------------------------------------------------------- +echo "-------------------Repairing numba wheel with auditwheel----------------------" + +WHEEL_DIR="$WORKING_DIR/$PACKAGE_DIR/dist" +REPAIRED_DIR="$WORKING_DIR/repaired_dist" +mkdir -p "$REPAIRED_DIR" + +if ! python3 -m auditwheel repair \ + --wheel-dir "$REPAIRED_DIR" \ + "$WHEEL_DIR"/*.whl; then + echo "------------------$PACKAGE_NAME:auditwheel_fails---------------------------------------" + echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | $OS_NAME | GitHub | Fail | Auditwheel_Fails" + exit 1 +fi +echo "-------------------auditwheel repair completed----------------------" +echo "Repaired wheel:" +ls -lh "$REPAIRED_DIR"/*.whl + +# ----------------------------------------------------------------------------- +# Install repaired numba wheel +# ----------------------------------------------------------------------------- +if ! python3 -m pip install "$REPAIRED_DIR"/*.whl; then + echo "------------------$PACKAGE_NAME:install_fails---------------------------------------" + echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | $OS_NAME | GitHub | Fail | Install_Fails" + exit 1 +fi + +# ----------------------------------------------------------------------------- +# Smoke test - verify installed versions and target triple. +# ----------------------------------------------------------------------------- +if ! python3 <