From 5b339f30eba32c318b9bfbb47623ebcb5df8d168 Mon Sep 17 00:00:00 2001 From: Amit Kumar Date: Thu, 15 Oct 2026 20:40:19 +0530 Subject: [PATCH 1/6] Added build script for numba_v0.65.1 --- n/numba/build_info.json | 11 +- n/numba/numba_0.65.1_ubi_10.2.sh | 237 +++++++++++++++++++++++++++++++ 2 files changed, 244 insertions(+), 4 deletions(-) create mode 100644 n/numba/numba_0.65.1_ubi_10.2.sh diff --git a/n/numba/build_info.json b/n/numba/build_info.json index f207a44f3a..1e22fa99b2 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,7 +28,10 @@ "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" + "build_script": "numba_0.65.1_ubi_10.2.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..a962d2b672 --- /dev/null +++ b/n/numba/numba_0.65.1_ubi_10.2.sh @@ -0,0 +1,237 @@ +#!/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"} +PYTHON_VERSION=${2:-"3.12"} +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="v0.47.0" +LLVM_VERSION="20.1.8" +LLVM_TAG="llvmorg-${LLVM_VERSION}" +LLVM_PREFIX="${LLVM_PREFIX:-"/opt/llvm-${LLVM_VERSION}"}" +NUMPY_VERSION=">=2.0.0,<2.5" + +if [ -z "${CPU_FLAGS+x}" ]; then + 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 +else + echo "Using caller supplied CPU_FLAGS='${CPU_FLAGS}'" +fi + +yum install -y wget git cmake ninja-build make gcc gcc-c++ \ + libffi-devel openssl-devel bzip2-devel xz-devel zlib-devel \ + "python${PYTHON_VERSION}" "python${PYTHON_VERSION}-devel" "python${PYTHON_VERSION}-pip" || true + +gcc --version +g++ --version + +export CFLAGS="${CPU_FLAGS}" +export CXXFLAGS="${CPU_FLAGS}" + +PYTHON_CMD=$(command -v "python${PYTHON_VERSION}" || command -v python3 || command -v python || true) +if [ -z "$PYTHON_CMD" ]; then + echo "ERROR: No Python interpreter found. Please install Python >= 3.12." + exit 1 +fi + +PYTHON_SHORT=$("$PYTHON_CMD" -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')") +echo "Using Python ${PYTHON_SHORT} (${PYTHON_CMD})" + +"$PYTHON_CMD" -c "import sys; assert sys.version_info >= (3, 12), f'Python >= 3.12 required for numba ${PACKAGE_VERSION}, found {sys.version}'" + +"$PYTHON_CMD" -m pip install --upgrade pip +"$PYTHON_CMD" -m pip install setuptools wheel build +# NumPy's Meson build manages per-ISA -mcpu flags internally; a global -mcpu +# via CFLAGS/CXXFLAGS conflicts with its VSX2 dispatch units and breaks the build. +(unset CFLAGS CXXFLAGS; "$PYTHON_CMD" -m pip install "numpy${NUMPY_VERSION}") + +# ----------------------------------------------------------------------------- +# Install LLVM +# ----------------------------------------------------------------------------- +echo "-------------------Installing LLVM ${LLVM_VERSION}----------------------" + +if [ -f "${LLVM_PREFIX}/lib64/cmake/llvm/LLVMConfig.cmake" ] || \ + [ -f "${LLVM_PREFIX}/lib/cmake/llvm/LLVMConfig.cmake" ]; then + echo "LLVM ${LLVM_VERSION} already present in ${LLVM_PREFIX} — reusing" +else + echo "Building LLVM ${LLVM_VERSION} ..." + rm -rf llvm-project + if ! git clone --depth 1 --branch ${LLVM_TAG} https://github.com/llvm/llvm-project llvm-project; then + echo "------------------llvm-project:clone_fails---------------------------------------" + echo "llvm-project | https://github.com/llvm/llvm-project | ${LLVM_TAG} | $OS_NAME | GitHub | Fail | Clone_Fails" + exit 1 + fi + cd llvm-project + mkdir build && cd build + + cmake \ + -DCMAKE_INSTALL_PREFIX="${LLVM_PREFIX}" \ + -DCMAKE_BUILD_TYPE=Release \ + -DLLVM_TARGETS_TO_BUILD="PowerPC" \ + -DCMAKE_C_FLAGS="${CPU_FLAGS}" \ + -DCMAKE_CXX_FLAGS="${CPU_FLAGS}" \ + -DLLVM_ENABLE_RTTI=ON \ + -DLLVM_ENABLE_LIBEDIT=OFF \ + -DLLVM_ENABLE_LIBXML2=OFF \ + -DLLVM_ENABLE_TERMINFO=OFF \ + -DLLVM_ENABLE_Z3_SOLVER=OFF \ + -DLLVM_ENABLE_ZLIB=OFF \ + -DLLVM_ENABLE_ZSTD=OFF \ + -DLLVM_INCLUDE_BENCHMARKS=OFF \ + -DLLVM_INCLUDE_DOCS=OFF \ + -DLLVM_INCLUDE_EXAMPLES=OFF \ + -DLLVM_INCLUDE_TESTS=OFF \ + -DLLVM_OPTIMIZED_TABLEGEN=ON \ + -GNinja \ + ../llvm + + echo "Building LLVM with $(nproc) jobs..." + ninja -j"$(nproc)" + ninja install + + cd "$WORKING_DIR" + rm -rf llvm-project +fi + +export CMAKE_PREFIX_PATH="${LLVM_PREFIX}${CMAKE_PREFIX_PATH:+:$CMAKE_PREFIX_PATH}" +export PATH="${LLVM_PREFIX}/bin:$PATH" +export LLVM_CONFIG="${LLVM_PREFIX}/bin/llvm-config" +llvm-config --version + +echo "-------------------LLVM ${LLVM_VERSION} installation completed----------------------" + +# ----------------------------------------------------------------------------- +# Build llvmlite wheel +# ----------------------------------------------------------------------------- +echo "-------------------Building llvmlite ${LLVMLITE_VERSION} wheel----------------------" + +rm -rf llvmlite +if ! git clone --depth 1 --branch ${LLVMLITE_VERSION} https://github.com/numba/llvmlite llvmlite; then + echo "------------------llvmlite:clone_fails---------------------------------------" + echo "llvmlite | https://github.com/numba/llvmlite | ${LLVMLITE_VERSION} | $OS_NAME | GitHub | Fail | Clone_Fails" + exit 1 +fi +cd llvmlite +if ! "$PYTHON_CMD" -m build --wheel --no-isolation; then + echo "------------------llvmlite:build_fails---------------------------------------" + echo "llvmlite | https://github.com/numba/llvmlite | ${LLVMLITE_VERSION} | $OS_NAME | GitHub | Fail | Build_Fails" + exit 1 +fi +cd "$WORKING_DIR" + +echo "-------------------llvmlite wheel built successfully----------------------" + +# ----------------------------------------------------------------------------- +# Build numba wheel +# ----------------------------------------------------------------------------- +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" +if ! "$PYTHON_CMD" -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----------------------" + +# ----------------------------------------------------------------------------- +# Install and test in isolated virtual environment +# ----------------------------------------------------------------------------- +echo "-------------------Installing and testing numba----------------------" + +VENV_DIR="$WORKING_DIR/test_env" +rm -rf "$VENV_DIR" +"$PYTHON_CMD" -m venv "$VENV_DIR" +"$VENV_DIR/bin/python" -m pip install --upgrade pip + +# Same NumPy CFLAGS/CXXFLAGS guard as above. +if ! (unset CFLAGS CXXFLAGS; "$VENV_DIR/bin/pip" install \ + "$WORKING_DIR/llvmlite"/dist/*.whl \ + "$WORKING_DIR/$PACKAGE_DIR"/dist/*.whl \ + "numpy${NUMPY_VERSION}"); then + echo "------------------$PACKAGE_NAME:install_fails---------------------------------------" + echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | $OS_NAME | GitHub | Fail | Install_Fails" + exit 1 +fi + +if ! "$VENV_DIR/bin/python" < Date: Fri, 16 Oct 2026 11:23:43 +0530 Subject: [PATCH 2/6] Resolved venv issues. --- n/numba/numba_0.65.1_ubi_10.2.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/n/numba/numba_0.65.1_ubi_10.2.sh b/n/numba/numba_0.65.1_ubi_10.2.sh index a962d2b672..3834a506ed 100644 --- a/n/numba/numba_0.65.1_ubi_10.2.sh +++ b/n/numba/numba_0.65.1_ubi_10.2.sh @@ -177,7 +177,8 @@ echo "-------------------Installing and testing numba----------------------" VENV_DIR="$WORKING_DIR/test_env" rm -rf "$VENV_DIR" "$PYTHON_CMD" -m venv "$VENV_DIR" -"$VENV_DIR/bin/python" -m pip install --upgrade pip +VENV_PYTHON="$VENV_DIR/bin/python3" +"$VENV_PYTHON" -m pip install --upgrade pip # Same NumPy CFLAGS/CXXFLAGS guard as above. if ! (unset CFLAGS CXXFLAGS; "$VENV_DIR/bin/pip" install \ @@ -189,7 +190,7 @@ if ! (unset CFLAGS CXXFLAGS; "$VENV_DIR/bin/pip" install \ exit 1 fi -if ! "$VENV_DIR/bin/python" < Date: Fri, 16 Oct 2026 12:21:51 +0530 Subject: [PATCH 3/6] Added Ninja Support. --- n/numba/numba_0.65.1_ubi_10.2.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/n/numba/numba_0.65.1_ubi_10.2.sh b/n/numba/numba_0.65.1_ubi_10.2.sh index 3834a506ed..ee62f20725 100644 --- a/n/numba/numba_0.65.1_ubi_10.2.sh +++ b/n/numba/numba_0.65.1_ubi_10.2.sh @@ -48,6 +48,23 @@ yum install -y wget git cmake ninja-build make gcc gcc-c++ \ libffi-devel openssl-devel bzip2-devel xz-devel zlib-devel \ "python${PYTHON_VERSION}" "python${PYTHON_VERSION}-devel" "python${PYTHON_VERSION}-pip" || true +# Verify critical build tools are present; install ninja from upstream if yum missed it. +if ! command -v ninja &>/dev/null; then + echo "ninja not found via yum — installing from upstream release..." + NINJA_BIN=$(mktemp -d)/ninja + wget -qO "$NINJA_BIN" \ + https://github.com/ninja-build/ninja/releases/latest/download/ninja-linux.zip \ + && unzip -p "$NINJA_BIN" ninja > /usr/local/bin/ninja \ + && chmod +x /usr/local/bin/ninja \ + || { echo "ERROR: Failed to install ninja"; exit 1; } + unset NINJA_BIN +fi +ninja --version + +if ! command -v gcc &>/dev/null || ! command -v g++ &>/dev/null; then + echo "ERROR: gcc/g++ not found. Ensure gcc and gcc-c++ are installed." + exit 1 +fi gcc --version g++ --version From 1b1f738b741779b662ee159c4b666bf28e2af744 Mon Sep 17 00:00:00 2001 From: Amit Kumar Date: Fri, 16 Oct 2026 13:17:34 +0530 Subject: [PATCH 4/6] added devfirst reference for numpy and llvmlite. --- n/numba/numba_0.65.1_ubi_10.2.sh | 253 ++++++++++--------------------- 1 file changed, 84 insertions(+), 169 deletions(-) diff --git a/n/numba/numba_0.65.1_ubi_10.2.sh b/n/numba/numba_0.65.1_ubi_10.2.sh index ee62f20725..04d700d44a 100644 --- a/n/numba/numba_0.65.1_ubi_10.2.sh +++ b/n/numba/numba_0.65.1_ubi_10.2.sh @@ -20,149 +20,57 @@ PACKAGE_NAME=numba PACKAGE_VERSION=${1:-"0.65.1"} -PYTHON_VERSION=${2:-"3.12"} 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="v0.47.0" -LLVM_VERSION="20.1.8" -LLVM_TAG="llvmorg-${LLVM_VERSION}" -LLVM_PREFIX="${LLVM_PREFIX:-"/opt/llvm-${LLVM_VERSION}"}" -NUMPY_VERSION=">=2.0.0,<2.5" - -if [ -z "${CPU_FLAGS+x}" ]; then - 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 -else - echo "Using caller supplied CPU_FLAGS='${CPU_FLAGS}'" -fi - -yum install -y wget git cmake ninja-build make gcc gcc-c++ \ - libffi-devel openssl-devel bzip2-devel xz-devel zlib-devel \ - "python${PYTHON_VERSION}" "python${PYTHON_VERSION}-devel" "python${PYTHON_VERSION}-pip" || true - -# Verify critical build tools are present; install ninja from upstream if yum missed it. -if ! command -v ninja &>/dev/null; then - echo "ninja not found via yum — installing from upstream release..." - NINJA_BIN=$(mktemp -d)/ninja - wget -qO "$NINJA_BIN" \ - https://github.com/ninja-build/ninja/releases/latest/download/ninja-linux.zip \ - && unzip -p "$NINJA_BIN" ninja > /usr/local/bin/ninja \ - && chmod +x /usr/local/bin/ninja \ - || { echo "ERROR: Failed to install ninja"; exit 1; } - unset NINJA_BIN -fi -ninja --version +LLVMLITE_VERSION="0.47.0" +NUMPY_VERSION="2.4.6" +DEVFIRST_INDEX="https://wheels.developerfirst.ibm.com/ppc64le/linux/+simple/" -if ! command -v gcc &>/dev/null || ! command -v g++ &>/dev/null; then - echo "ERROR: gcc/g++ not found. Ensure gcc and gcc-c++ are installed." - exit 1 +# ----------------------------------------------------------------------------- +# 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 -gcc --version -g++ --version export CFLAGS="${CPU_FLAGS}" export CXXFLAGS="${CPU_FLAGS}" -PYTHON_CMD=$(command -v "python${PYTHON_VERSION}" || command -v python3 || command -v python || true) -if [ -z "$PYTHON_CMD" ]; then - echo "ERROR: No Python interpreter found. Please install Python >= 3.12." - exit 1 -fi - -PYTHON_SHORT=$("$PYTHON_CMD" -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')") -echo "Using Python ${PYTHON_SHORT} (${PYTHON_CMD})" - -"$PYTHON_CMD" -c "import sys; assert sys.version_info >= (3, 12), f'Python >= 3.12 required for numba ${PACKAGE_VERSION}, found {sys.version}'" - -"$PYTHON_CMD" -m pip install --upgrade pip -"$PYTHON_CMD" -m pip install setuptools wheel build -# NumPy's Meson build manages per-ISA -mcpu flags internally; a global -mcpu -# via CFLAGS/CXXFLAGS conflicts with its VSX2 dispatch units and breaks the build. -(unset CFLAGS CXXFLAGS; "$PYTHON_CMD" -m pip install "numpy${NUMPY_VERSION}") - # ----------------------------------------------------------------------------- -# Install LLVM +# System dependencies # ----------------------------------------------------------------------------- -echo "-------------------Installing LLVM ${LLVM_VERSION}----------------------" +yum install -y wget git gcc gcc-c++ \ + python3-pip python3-devel \ + libffi-devel openssl-devel bzip2-devel xz-devel zlib-devel -if [ -f "${LLVM_PREFIX}/lib64/cmake/llvm/LLVMConfig.cmake" ] || \ - [ -f "${LLVM_PREFIX}/lib/cmake/llvm/LLVMConfig.cmake" ]; then - echo "LLVM ${LLVM_VERSION} already present in ${LLVM_PREFIX} — reusing" -else - echo "Building LLVM ${LLVM_VERSION} ..." - rm -rf llvm-project - if ! git clone --depth 1 --branch ${LLVM_TAG} https://github.com/llvm/llvm-project llvm-project; then - echo "------------------llvm-project:clone_fails---------------------------------------" - echo "llvm-project | https://github.com/llvm/llvm-project | ${LLVM_TAG} | $OS_NAME | GitHub | Fail | Clone_Fails" - exit 1 - fi - cd llvm-project - mkdir build && cd build - - cmake \ - -DCMAKE_INSTALL_PREFIX="${LLVM_PREFIX}" \ - -DCMAKE_BUILD_TYPE=Release \ - -DLLVM_TARGETS_TO_BUILD="PowerPC" \ - -DCMAKE_C_FLAGS="${CPU_FLAGS}" \ - -DCMAKE_CXX_FLAGS="${CPU_FLAGS}" \ - -DLLVM_ENABLE_RTTI=ON \ - -DLLVM_ENABLE_LIBEDIT=OFF \ - -DLLVM_ENABLE_LIBXML2=OFF \ - -DLLVM_ENABLE_TERMINFO=OFF \ - -DLLVM_ENABLE_Z3_SOLVER=OFF \ - -DLLVM_ENABLE_ZLIB=OFF \ - -DLLVM_ENABLE_ZSTD=OFF \ - -DLLVM_INCLUDE_BENCHMARKS=OFF \ - -DLLVM_INCLUDE_DOCS=OFF \ - -DLLVM_INCLUDE_EXAMPLES=OFF \ - -DLLVM_INCLUDE_TESTS=OFF \ - -DLLVM_OPTIMIZED_TABLEGEN=ON \ - -GNinja \ - ../llvm - - echo "Building LLVM with $(nproc) jobs..." - ninja -j"$(nproc)" - ninja install - - cd "$WORKING_DIR" - rm -rf llvm-project -fi - -export CMAKE_PREFIX_PATH="${LLVM_PREFIX}${CMAKE_PREFIX_PATH:+:$CMAKE_PREFIX_PATH}" -export PATH="${LLVM_PREFIX}/bin:$PATH" -export LLVM_CONFIG="${LLVM_PREFIX}/bin/llvm-config" -llvm-config --version +gcc --version +g++ --version -echo "-------------------LLVM ${LLVM_VERSION} installation completed----------------------" +python3 --version +python3 -m pip install --upgrade pip +python3 -m pip install setuptools wheel build auditwheel patchelf # ----------------------------------------------------------------------------- -# Build llvmlite wheel +# Install numpy and llvmlite from DevFirst portal — pre-built ppc64le wheels. # ----------------------------------------------------------------------------- -echo "-------------------Building llvmlite ${LLVMLITE_VERSION} wheel----------------------" - -rm -rf llvmlite -if ! git clone --depth 1 --branch ${LLVMLITE_VERSION} https://github.com/numba/llvmlite llvmlite; then - echo "------------------llvmlite:clone_fails---------------------------------------" - echo "llvmlite | https://github.com/numba/llvmlite | ${LLVMLITE_VERSION} | $OS_NAME | GitHub | Fail | Clone_Fails" - exit 1 -fi -cd llvmlite -if ! "$PYTHON_CMD" -m build --wheel --no-isolation; then - echo "------------------llvmlite:build_fails---------------------------------------" - echo "llvmlite | https://github.com/numba/llvmlite | ${LLVMLITE_VERSION} | $OS_NAME | GitHub | Fail | Build_Fails" +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 "------------------llvmlite/numpy:install_fails---------------------------------------" + echo "$PACKAGE_NAME | ${DEVFIRST_INDEX} | $OS_NAME | GitHub | Fail | Install_Fails" exit 1 fi -cd "$WORKING_DIR" - -echo "-------------------llvmlite wheel built successfully----------------------" +echo "-------------------numpy and llvmlite installed successfully----------------------" # ----------------------------------------------------------------------------- # Build numba wheel @@ -175,74 +83,67 @@ if ! git clone --depth 1 --branch "$PACKAGE_VERSION" "$PACKAGE_URL" "$PACKAGE_DI echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | $OS_NAME | GitHub | Fail | Clone_Fails" exit 1 fi - cd "$PACKAGE_DIR" -if ! "$PYTHON_CMD" -m build --wheel --no-isolation; then +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----------------------" # ----------------------------------------------------------------------------- -# Install and test in isolated virtual environment +# Repair numba wheel with auditwheel — bundles all non-system shared libraries +# (.so files) into the wheel and retags it as manylinux, making it +# self-contained at the native library level. # ----------------------------------------------------------------------------- -echo "-------------------Installing and testing numba----------------------" +echo "-------------------Repairing numba wheel with auditwheel----------------------" -VENV_DIR="$WORKING_DIR/test_env" -rm -rf "$VENV_DIR" -"$PYTHON_CMD" -m venv "$VENV_DIR" -VENV_PYTHON="$VENV_DIR/bin/python3" -"$VENV_PYTHON" -m pip install --upgrade pip +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 -# Same NumPy CFLAGS/CXXFLAGS guard as above. -if ! (unset CFLAGS CXXFLAGS; "$VENV_DIR/bin/pip" install \ - "$WORKING_DIR/llvmlite"/dist/*.whl \ - "$WORKING_DIR/$PACKAGE_DIR"/dist/*.whl \ - "numpy${NUMPY_VERSION}"); then +# ----------------------------------------------------------------------------- +# 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 -if ! "$VENV_PYTHON" <&1; then + echo "------------------$PACKAGE_NAME:install_success_but_test_fails---------------------" + echo "$PACKAGE_URL $PACKAGE_NAME" + cd "$WORKING_DIR" + exit 2 +fi +cd "$WORKING_DIR" + echo "------------------$PACKAGE_NAME:install_&_test_both_success-------------------------" -echo "$PACKAGE_URL $PACKAGE_NAME" +echo "Wheel: $(ls "$REPAIRED_DIR"/*.whl)" exit 0 From bf0acd1da63d98a276cdeba0758a9f531e0fde97 Mon Sep 17 00:00:00 2001 From: Amit Kumar Date: Wed, 21 Oct 2026 20:35:06 +0530 Subject: [PATCH 5/6] Replaced the script. --- n/numba/numba_0.65.1_ubi_10.2.sh | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/n/numba/numba_0.65.1_ubi_10.2.sh b/n/numba/numba_0.65.1_ubi_10.2.sh index 04d700d44a..bf5e0c5e9f 100644 --- a/n/numba/numba_0.65.1_ubi_10.2.sh +++ b/n/numba/numba_0.65.1_ubi_10.2.sh @@ -34,10 +34,10 @@ DEVFIRST_INDEX="https://wheels.developerfirst.ibm.com/ppc64le/linux/+simple/" # ----------------------------------------------------------------------------- if grep -q "POWER10" /proc/cpuinfo 2>/dev/null; then CPU_FLAGS="-mcpu=power10 -mtune=power10" - echo "Detected POWER10 — applying power10 optimization flags" + echo "Detected POWER10 - applying power10 optimization flags" else CPU_FLAGS="" - echo "POWER10 not detected — no arch-specific flags applied" + echo "POWER10 not detected - no arch-specific flags applied" fi export CFLAGS="${CPU_FLAGS}" @@ -58,22 +58,21 @@ python3 -m pip install --upgrade pip python3 -m pip install setuptools wheel build auditwheel patchelf # ----------------------------------------------------------------------------- -# Install numpy and llvmlite from DevFirst portal — pre-built ppc64le wheels. +# 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 "------------------llvmlite/numpy:install_fails---------------------------------------" + 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----------------------" # ----------------------------------------------------------------------------- -# Build numba wheel +# Clone numba # ----------------------------------------------------------------------------- echo "-------------------Building numba ${PACKAGE_VERSION} wheel----------------------" @@ -83,7 +82,12 @@ if ! git clone --depth 1 --branch "$PACKAGE_VERSION" "$PACKAGE_URL" "$PACKAGE_DI 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" @@ -93,9 +97,8 @@ 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, making it -# self-contained at the native library level. +# 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----------------------" @@ -124,7 +127,7 @@ if ! python3 -m pip install "$REPAIRED_DIR"/*.whl; then fi # ----------------------------------------------------------------------------- -# Smoke test — verify installed versions and target triple. +# Smoke test - verify installed versions and target triple. # ----------------------------------------------------------------------------- if ! python3 <&1; then +if ! python3 -c "import numba; import numba.core.annotations; import numba.core.datamodel; import numba.core.rewrites; import numba.core.runtime; import numba.core.typing; import numba.core.unsafe; import numba.experimental.jitclass; import numba.np.ufunc; import numba.pycc; import numba.scripts; import numba.testing; import numba.tests; import numba.tests.npyufunc;"; then echo "------------------$PACKAGE_NAME:install_success_but_test_fails---------------------" echo "$PACKAGE_URL $PACKAGE_NAME" cd "$WORKING_DIR" From 67d353d4b2fe64add350cdc644c75c43429035ad Mon Sep 17 00:00:00 2001 From: Amit Kumar Date: Fri, 23 Oct 2026 15:59:43 +0530 Subject: [PATCH 6/6] Update build_info.json --- n/numba/build_info.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/n/numba/build_info.json b/n/numba/build_info.json index 1e22fa99b2..f1716dabdf 100644 --- a/n/numba/build_info.json +++ b/n/numba/build_info.json @@ -32,6 +32,6 @@ "build_script": "numba_0.65.1_ubi_10.2.sh" }, "*": { - "build_script": "numba_0.65.1_ubi_10.2.sh" + "build_script": "numba_0.64.0_ubi_9.3.sh" } }