From c8d45fd27d1c8e436da8a871e45228535ba4ba9a Mon Sep 17 00:00:00 2001 From: Anton Volkov Date: Sun, 25 Oct 2026 14:22:04 +0100 Subject: [PATCH] Read sysroot glibc version without conda CLI in build.sh The `ubuntu-latest` GitHub runner moved to ubuntu-26.04, which no longer ships Miniconda. The rattler-build job relied on it to run `conda list`, so the glibc version came out empty and the wheel was retagged as `manylinux___x86_64`, which pip then rejected. Read the `sysroot_linux-64` version from the build env `conda-meta` records instead, which both rattler-build and conda-build provide, and fail early if it cannot be detected. --- CHANGELOG.md | 1 + conda-recipe/build.sh | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eeb32c244e14..5cb88c4c1169 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -126,6 +126,7 @@ This release is compatible with NumPy 2.5. * Fixed importing `dpnp.scipy.sparse` re-enabling the GIL on free-threaded Python builds, because its pybind11 extension did not declare free-threading support [#3101](https://github.com/IntelPython/dpnp/pull/3101) * Fixed the CuPy-based `dpnp.scipy` tests under `dpnp/tests/third_party/cupyx/scipy_tests/` missing from the `dpnp` package, so they never ran against an installed package [#3102](https://github.com/IntelPython/dpnp/pull/3102) * Fixed a `RuntimeError` raised by kernels of the `blas`, `statistics`, `ufunc` and `window` extensions and of the legacy backend launched over more than `INT_MAX` work-items when built with DPC++ compiler 2026.2 or newer [#3104](https://github.com/IntelPython/dpnp/pull/3104) +* Fixed the Linux conda build producing a wheel with an invalid `manylinux___x86_64` platform tag when the `conda` CLI is not on `PATH` [#3126](https://github.com/IntelPython/dpnp/pull/3126) ### Security diff --git a/conda-recipe/build.sh b/conda-recipe/build.sh index dedcbe37f0e5..7028c8830bb6 100755 --- a/conda-recipe/build.sh +++ b/conda-recipe/build.sh @@ -12,8 +12,15 @@ export ICPXCFG ICXCFG="$(pwd)/icpx_for_conda.cfg" export ICXCFG -read -r GLIBC_MAJOR GLIBC_MINOR <<<"$(conda list '^sysroot_linux-64$' \ - | tail -n 1 | awk '{print $2}' | grep -oP '\d+' | head -n 2 | tr '\n' ' ')" +# Get sysroot glibc version from the build env metadata (no conda CLI needed) +SYSROOT_META=("${BUILD_PREFIX}"/conda-meta/sysroot_linux-64-*.json) +if [[ "${SYSROOT_META[0]##*/}" =~ ^sysroot_linux-64-([0-9]+)\.([0-9]+) ]]; then + GLIBC_MAJOR="${BASH_REMATCH[1]}" + GLIBC_MINOR="${BASH_REMATCH[2]}" +else + echo "Error: unable to detect sysroot_linux-64 version in ${BUILD_PREFIX}" >&2 + exit 1 +fi if [ -e "_skbuild" ]; then ${PYTHON} setup.py clean --all