Skip to content

Publish prebuilt wheels to PyPI (docs, release flow, musllinux) - #2

Merged
prostomarkeloff merged 1 commit into
mainfrom
pypi-prebuilt-wheels
Jun 24, 2026
Merged

Publish prebuilt wheels to PyPI (docs, release flow, musllinux)#2
prostomarkeloff merged 1 commit into
mainfrom
pypi-prebuilt-wheels

Conversation

@prostomarkeloff

Copy link
Copy Markdown
Owner

Makes pip install directiva / uv add directiva install a prebuilt abi3 wheel with no Rust toolchain, on every common platform.

What was wrong

The repo shipped abi3 wheels via the CI matrix but documented "No PyPI" — install was a release-asset URL or pip install git+… (the latter builds from source → needs a compiler). Nothing pointed at PyPI.

Changes

  • README — install section is now pip install directiva / uv add directiva (prebuilt). Source build kept only as the no-matching-wheel fallback.
  • CI — header documents the release procedure (tag → matrix → uv publish dist/*). Added a musllinux_1_2 wheel job (x86_64 + aarch64) so Alpine/musl Docker installs get a prebuilt wheel instead of a source fallback. Added to release.needs.
  • Makefiledist (local one-platform smoke build), dist-fetch TAG= (gh release download), publish (uv publish dist/*).

Verified locally

  • uv build → abi3 wheel (cp39-abi3, works on CPython ≥ 3.9) + self-contained sdist.
  • Wheel installs into a clean venv with --no-build (compilation forbidden) and imports + runs.

Coverage after this

linux glibc (x86_64/aarch64) · linux musl (x86_64/aarch64) · macOS (x86_64/arm64) · Windows x64 · sdist fallback.

Release (manual, maintainer runs uv publish)

# bump version in Cargo.toml, commit
git tag vX.Y.Z && git push --tags     # CI builds the matrix, attaches to the GH release
make dist-fetch TAG=vX.Y.Z            # pull every wheel + sdist into ./dist
make publish                          # uv publish dist/*  (UV_PUBLISH_TOKEN)

Preconditions: the directiva name is available/owned on PyPI; PyPI token on the maintainer's machine.

- README: install via `pip install directiva` / `uv add directiva` (prebuilt
  abi3 wheels), with the source build kept only as the no-matching-wheel fallback.
- CI: document the tag → matrix → `uv publish dist/*` release procedure in the
  header; add a musllinux_1_2 (x86_64/aarch64) wheel job so Alpine/musl installs
  get a prebuilt wheel instead of falling back to a source build.
- Makefile: `dist`, `dist-fetch TAG=`, `publish` targets wrapping the flow
  (local `uv build` is one platform only; publish the CI-built set).
@prostomarkeloff
prostomarkeloff merged commit 8a64230 into main Jun 24, 2026
11 checks passed
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