From 3bae76e4357ec0c02bf812b8099144f0e1b821b9 Mon Sep 17 00:00:00 2001 From: Jim Schaff Date: Wed, 24 Jun 2026 08:13:49 -0400 Subject: [PATCH] Ship one py3-none wheel per platform instead of per-Python-version libvcell is pure Python plus a ctypes-loaded GraalVM native library, with no compiled CPython extension. The wheel therefore has no CPython ABI dependency and does not need to be built/tagged per Python version (cp310..cp314). Build a single interpreter (cp311) per platform with cibuildwheel (keeping its auditwheel/delocate/delvewheel repair so the manylinux/macosx/win platform tags stay correct), then retag the result cp311-cp311- -> py3-none-. Requires-Python in the wheel metadata still enforces the >=3.10 floor. Effect: ~5x fewer wheels and ~5x less storage per release (~34 -> ~7 wheels, ~1.45GB -> ~0.28GB), and a correspondingly faster release build. This addresses the PyPI 10GB project-size limit that the per-cp matrix was driving toward. Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/on-release-main.yml | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/.github/workflows/on-release-main.yml b/.github/workflows/on-release-main.yml index 9c7ecf0..4f2f86a 100644 --- a/.github/workflows/on-release-main.yml +++ b/.github/workflows/on-release-main.yml @@ -64,11 +64,10 @@ jobs: ARCH=$(uname -m) echo "ARCH_DEF=$ARCH" >> $GITHUB_ENV echo "MANYLINUX_IMAGE_TARGET=ghcr.io/virtualcell/manylinux_${{ matrix.glibc }}_$ARCH:latest" >> $GITHUB_ENV - CIBW_BUILD_STRING="cp310-*${{ env.ARCH_DEF }} cp311-*${{ env.ARCH_DEF }} cp312-*${{ env.ARCH_DEF }} cp313-*${{ env.ARCH_DEF }}" - if [ "${{ matrix.glibc }}" = "2_34" ]; then - CIBW_BUILD_STRING="$CIBW_BUILD_STRING cp314-*${{ env.ARCH_DEF }}" - fi - echo "CIBW_BUILD_TARGETS=$CIBW_BUILD_STRING" >> $GITHUB_ENV + # libvcell is pure Python + a ctypes-loaded GraalVM native library (no CPython + # extension), so the wheel is not tied to a Python version. Build a single + # interpreter per platform and retag it to py3-none below. + echo "CIBW_BUILD_TARGETS=cp311-*" >> $GITHUB_ENV - name: Run cibuildwheel (Ubuntu, x86_64) uses: pypa/cibuildwheel@v3.4.0 @@ -92,7 +91,21 @@ jobs: pip install cibuildwheel cibuildwheel --debug-traceback --output-dir wheelhouse env: - CIBW_BUILD: "cp310-* cp311-* cp312-* cp313-* cp314-*" + CIBW_BUILD: "cp311-*" + + - name: Retag wheels as py3-none (ABI-independent, one wheel per platform) + run: | + python -m pip install --upgrade wheel + for whl in wheelhouse/*.whl; do + echo "retagging $whl" + # Change cp311-cp311 -> py3-none, preserving the (manylinux/macosx/win) platform tag. + # The bundled native lib is loaded via ctypes, so it has no CPython ABI dependency + # and the resulting wheel installs on any supported Python 3.x. Requires-Python in + # the wheel metadata still enforces the >=3.10 floor. + python -m wheel tags --python-tag py3 --abi-tag none --remove "$whl" + done + ls -l wheelhouse + - name: Copy wheels to dist directory run: | mkdir -p dist