Skip to content

Ship one py3-none wheel per platform instead of per-Python-version#22

Merged
jcschaff merged 1 commit into
mainfrom
switch-to-py3-none-wheels
Jun 24, 2026
Merged

Ship one py3-none wheel per platform instead of per-Python-version#22
jcschaff merged 1 commit into
mainfrom
switch-to-py3-none-wheels

Conversation

@jcschaff

Copy link
Copy Markdown
Member

Why

libvcell is pure Python + a ctypes-loaded GraalVM native library — there is no compiled CPython extension (native_utils.py uses ctypes.CDLL; build.py has no Extension/ext_modules). So the wheel has no CPython ABI dependency and does not need to be built or tagged per Python version.

Note: abi3 (cpNN-abi3) doesn't apply here — that's for C extensions built against the limited API. py3-none-<platform> is the correct, even-more-portable analog: any Python 3.x, no ABI pin. The >=3.10 floor is still enforced via the wheel's Requires-Python metadata.

What

  • Build a single interpreter (cp311) per platform with cibuildwheel (keeping auditwheel/delocate/delvewheel repair, so manylinux/macosx/win platform tags stay valid).
  • Retag the result cp311-cp311-<platform>py3-none-<platform> (python -m wheel tags --python-tag py3 --abi-tag none --remove), preserving the platform tag.

Effect

Before (per-cpNN) After (py3-none)
Wheels / release ~34 ~7
Size / release ~1.45 GB ~0.28 GB
Native-image builds 5 per platform 1 per platform

This is the structural fix for the PyPI 10 GB project-size limit the per-cp matrix was driving the project toward, and it roughly 5× speeds up the release build.

Validation

The retag mechanism is the same one used to produce the local macOS arm wheels in this effort (verified: the identical dylib loads on Python 3.12 and 3.14). The release workflow isn't exercised by PR CI, so before relying on it you can manually run the workflow (workflow_dispatch) — the publish step is gated on release events, so a dispatch run builds + dry-run-publishes the py3-none wheels without uploading.

Follow-up (not in this PR)

The glibc: [2_28, 2_34] matrix now yields two redundant Linux wheels per arch — a manylinux_2_28 wheel already installs on glibc ≥2.28 (incl. 2.34). Dropping the 2_34 dimension is a safe further reduction.

🤖 Generated with Claude Code

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-<platform> -> py3-none-<platform>.
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) <noreply@anthropic.com>
@jcschaff jcschaff merged commit 187a9cc into main Jun 24, 2026
6 checks passed
@jcschaff jcschaff deleted the switch-to-py3-none-wheels branch June 24, 2026 12:27
@jcschaff jcschaff mentioned this pull request Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant