From b3068e64fa968731558a36d693c9b85ae3c4d374 Mon Sep 17 00:00:00 2001 From: "riseproject-dev[bot]" <330740410+riseproject-dev[bot]@users.noreply.github.com> Date: Wed, 30 Sep 2026 08:10:52 +0000 Subject: [PATCH 1/2] pyslang: Add version 12.0.0 Signed-off-by: riseproject-dev[bot] <330740410+riseproject-dev[bot]@users.noreply.github.com> --- docs/packages/pyslang.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/packages/pyslang.yaml b/docs/packages/pyslang.yaml index 6eaa773b1e07..e0e5816e6353 100644 --- a/docs/packages/pyslang.yaml +++ b/docs/packages/pyslang.yaml @@ -13,3 +13,4 @@ versions: sha256: 4a7afec71fefc257b7e5c8ef21afd4cafab307e996cab86028f78f8b9676764f - filename: pyslang-11.0.0-cp314-cp314t-manylinux_2_39_riscv64.whl sha256: 594be7f4426650552dd3e58803d2b5bd7c0582c6a90bdee1899270edc0e722b7 +- version: 12.0.0 From 1b89b38e6e30935c5857c48c2bdb574656d78387 Mon Sep 17 00:00:00 2001 From: Ludovic Henry Date: Sat, 10 Oct 2026 20:51:04 +0000 Subject: [PATCH 2/2] pyslang: build on cp311-abi3, drop the cp314t leg v12.0.0 moved bindings/CMakeLists.txt from pybind11 to nanobind's split mode (nanobind_add_module(... BACKEND_MODULE nanobind_backend STABLE_ABI_VERSION 3.11)), so pyproject.toml now sets `wheel.py-api = "cp311"` and upstream's own python-dist.yml builds one cp311-abi3 wheel per OS with no interpreter matrix at all (gotcha 11). All four matrix legs were failing: - cp312/cp313/cp314 built and tested fine, but "Check wheel contents" still expected the old pybind11-era per-interpreter filename (pyslang.cpython--riscv64-linux-gnu.so); the actual extension is now the abi3-tagged pyslang.abi3.so. - cp314t failed earlier, at the build-dependency resolution step: pip cannot find any nanobind-backend wheel for cp313t/cp314t ("from versions: none"). nanobind-backend only ships cp310-cp315 and cp315t on PyPI, with no cp313t/cp314t wheel on any platform, so this is an upstream gap, not an riscv64-specific one. Build once on cp311, the floor the abi3 tag actually promises, instead of on cp312+ as the old per-interpreter matrix did -- building a wheel tagged cp311-abi3 against newer-than-3.11 headers risks shipping one that is broken on 3.11 while claiming to support it (gotcha 96). Drop the cp314t leg entirely: with no nanobind-backend wheel to build against, pyslang ships no free-threaded wheel upstream either (the abi3-only, no-cp314t-variant shape of gotcha 11). Fix the wheel-contents check for the new abi3 filename and update the job name, cibuildwheel `only` selector and artifact name accordingly. --- .github/workflows/build-pyslang.yml | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-pyslang.yml b/.github/workflows/build-pyslang.yml index fe4291bb7d3a..c09785d0cfb0 100644 --- a/.github/workflows/build-pyslang.yml +++ b/.github/workflows/build-pyslang.yml @@ -2,7 +2,7 @@ # SPDX-License-Identifier: MIT --- # This workflow is based on the `build_wheels` job of -# https://github.com/MikePopoloski/slang/blob/v11.0/.github/workflows/python-dist.yml +# https://github.com/MikePopoloski/slang/blob/v12.0/.github/workflows/python-dist.yml name: Build pyslang wheels (riscv64) on: @@ -45,17 +45,30 @@ jobs: package: pyslang version: ${{ inputs.version }} + # v12.0.0 moved bindings/CMakeLists.txt from pybind11 to nanobind's split mode + # (nanobind_add_module(... BACKEND_MODULE nanobind_backend STABLE_ABI_VERSION + # 3.11)): pyproject.toml now sets `wheel.py-api = "cp311"`, so cibuildwheel + # produces a single cp311-abi3 wheel that covers every newer non-free-threaded + # interpreter (CLAUDE.md gotcha 11), and upstream's own python-dist.yml builds + # it once per OS with no interpreter matrix at all. Building it on cp312+ + # here (as the old per-interpreter pybind11 matrix did) would tag the wheel + # cp311-abi3 while compiling it against newer headers than the tag claims + # (gotcha 96), so build on cp311, the floor the tag actually promises. + # + # Free-threaded (cp314t) is dropped: nanobind-backend>=1.0 publishes no + # cp313t/cp314t wheel on *any* platform (only cp315t), so pyslang ships no + # free-threaded wheel upstream either (the litellm/gotcha-11 "abi3-only, no + # cp314t variant" shape) -- this is an upstream gap, not riscv64-specific. build_wheels: needs: [setup] if: needs.setup.outputs.versions != '[]' - name: Build pyslang ${{ matrix.version }} ${{ matrix.python }}-manylinux_riscv64 + name: Build pyslang ${{ matrix.version }} cp311-abi3-manylinux_riscv64 runs-on: ubuntu-24.04-riscv timeout-minutes: 360 strategy: fail-fast: false matrix: version: ${{ fromJSON(needs.setup.outputs.versions) }} - python: ["cp312", "cp313", "cp314", "cp314t"] env: PYSLANG_VERSION: ${{ matrix.version }} @@ -90,7 +103,7 @@ jobs: uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 with: output-dir: wheelhouse/ - only: ${{ matrix.python }}-manylinux_riscv64 + only: cp311-manylinux_riscv64 env: CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} CIBW_ENVIRONMENT: 'SKBUILD_WHEEL_LICENSE_FILES="LICENSE;LICENSE.boost-headers;LICENSE.bs-thread-pool;LICENSE.fmt;LICENSE.pybind11"' @@ -101,8 +114,10 @@ jobs: import sys, zipfile names = zipfile.ZipFile(sys.argv[1]).namelist() exts = [n for n in names if n.endswith(".so")] - assert len(exts) == 1 and exts[0].startswith("pyslang/pyslang.cpython-"), exts - assert exts[0].endswith("-riscv64-linux-gnu.so"), exts + # nanobind's split mode (stable ABI) names the extension + # ".abi3.so" with no interpreter/platform tag baked in -- that + # information already lives in the wheel's own filename instead. + assert exts == ["pyslang/pyslang.abi3.so"], exts assert any(n.endswith(".pyi") for n in names), names licences = {n.split(".dist-info/licenses/", 1)[1] for n in names if ".dist-info/licenses/" in n and not n.endswith("/")} @@ -112,7 +127,7 @@ jobs: - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: - name: pyslang-${{ env.PYSLANG_VERSION }}-${{ matrix.python }}-manylinux_riscv64 + name: pyslang-${{ env.PYSLANG_VERSION }}-cp311-abi3-manylinux_riscv64 path: wheelhouse/*.whl if-no-files-found: error