Skip to content

Build manylinux wheels; merge CI/release; migrate to uv - #11

Merged
ewjoachim merged 11 commits into
botify-labs:mainfrom
ewjoachim:build-manylinux-wheels
Jun 23, 2026
Merged

Build manylinux wheels; merge CI/release; migrate to uv#11
ewjoachim merged 11 commits into
botify-labs:mainfrom
ewjoachim:build-manylinux-wheels

Conversation

@ewjoachim

@ewjoachim ewjoachim commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Closes #10.

Builds auditwheel-repaired manylinux (+ musllinux) wheels on release via cibuildwheel 4.1.0, gated behind the test matrix, and migrates the dev/CI tooling to uv.

1. manylinux wheels (#10)

  • pyproject.toml: PEP 517 [build-system] (setuptools + cffi) so the cffi extension builds in an isolated frontend, plus [tool.cibuildwheel] (build frontend, pytest run against each wheel, 64-bit-only Linux via auto64).
  • cibuildwheel reads requires-python and builds CPython 3.10–3.14 + PyPy 3.10/3.11 — covering the cp3.14 + pp3.11 requested in Build manylinux wheels #10. 😉 auditwheel repair is automatic.

2. One workflow, tested releases

  • Folded the former pypi.yaml into ci.yaml (deleted pypi.yaml) and added release: [created] to the triggers.
  • build_wheels / build_sdist / upload are gated with if: github.event_name == 'release', and the build jobs needs: [linux_lint_and_test, macos_test]a release is published only after its tests pass.

3. Test matrix

  • Dropped EOL 3.7–3.9 + pypy3.8; now test 3.10, 3.11, 3.12, 3.13, 3.14, pypy3.10, pypy3.11 on Linux and macOS.

4. Migrate to uv

  • Replaced the hand-pinned dev-requirements.txt (cffi was pinned to 1.15.1, which can't build on 3.12+) with a PEP 735 [dependency-groups] dev group locked in uv.lock.
  • Moved package metadata from setup.py into a [project] table. setup.py is now a thin shim: it only wires the cffi extension (cffi_modules, which has no pyproject equivalent) and feeds the dunamai-bumped VERSION via dynamic = ["version"].
  • All workflows (CI, release, docs) use astral-sh/setup-uv with uv sync / uv run / uvx / uv build instead of pip.
  • Modernized ruff config ([tool.ruff.lint], ruff check) and reformatted build.py with current black. Updated CONTRIBUTING.md.

Validation (locally, Python 3.14 via uv)

  • uv sync builds the extension; uv run invoke lint (ruff + black) passes; uv run invoke test --coverage6/6 pass, 100% coverage.
  • uv build produces a wheel + sdist; the wheel imports and computes correct FNV hashes; the sdist includes fnv.c/fnv.h so source installs still compile.
  • ci.yaml / docs.yaml validated as well-formed YAML.

Notes

  • Linux-only wheels, as requested; macOS/Windows would be a one-line matrix addition. aarch64 omitted (needs QEMU/ARM runners).
  • requires-python is now >=3.10, so wheels and tested versions match. 3.7–3.9 are dropped entirely.

🤖 Generated with Claude Code

ewjoachim and others added 4 commits June 23, 2026 13:15
Add a PEP 517 [build-system] section so the cffi C extension builds in
an isolated frontend, and rework the PyPI release workflow to build
auditwheel-repaired manylinux/musllinux wheels via cibuildwheel 4.1.0
(covering CPython 3.9-3.14 and PyPy 3.9-3.11) alongside the sdist.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Fold the release build/upload jobs into ci.yaml and add `release` to its
triggers. The build_wheels/build_sdist/upload jobs `needs` the lint+test
jobs and are gated with `if: github.event_name == 'release'`, so a
release is published only after its tests pass. Deletes pypi.yaml.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Drop end-of-life 3.7-3.9 and pypy3.8 from the CI matrix, add 3.12-3.14
and pypy3.10/3.11, so the tested versions match the wheels we publish.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Replace the hand-pinned dev-requirements.txt with a PEP 735 [dependency-groups]
dev group locked in uv.lock, and move package metadata from setup.py into a
[project] table in pyproject.toml (setup.py is now a thin shim that only wires
the cffi extension via cffi_modules and feeds the dunamai-bumped VERSION through
`dynamic = ["version"]`).

CI, the release jobs, and the docs workflow now use astral-sh/setup-uv with
`uv sync` / `uv run` / `uvx` instead of pip. Bump requires-python to >=3.10 so
the published wheels (cibuildwheel reads requires-python) match the tested
versions. Modernize the ruff config ([tool.ruff.lint]) and `ruff check` CLI,
and reformat build.py with current black.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ewjoachim ewjoachim changed the title Build manylinux wheels with cibuildwheel Build manylinux wheels; merge CI/release; migrate to uv Jun 23, 2026
@ewjoachim
ewjoachim force-pushed the build-manylinux-wheels branch from 179d694 to 4bb88a3 Compare June 23, 2026 11:55
Replace `twine upload` with `uv publish --trusted-publishing always` and
grant the upload job `id-token: write`, so PyPI authenticates the release
via OIDC. Drops the TWINE_USERNAME/TWINE_PASSWORD secrets.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ewjoachim
ewjoachim force-pushed the build-manylinux-wheels branch from a80e461 to e9339a3 Compare June 23, 2026 12:11
twine is no longer used now that publishing goes through
pypa/gh-action-pypi-publish. It pulled keyring -> secretstorage ->
cryptography, whose current release fails to build on PyPy 3.10
(pyo3/abi3 requires PyPy >= 3.11), breaking the pypy CI jobs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ewjoachim
ewjoachim force-pushed the build-manylinux-wheels branch from f39122b to a9aab1a Compare June 23, 2026 13:36
ewjoachim and others added 4 commits June 23, 2026 15:47
Group runs by branch/PR so pushing a new commit cancels the older
in-progress run. Releases are exempt (cancel-in-progress is false for
release events) so a publish in flight is never interrupted.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
We only build Linux wheels, so the one-entry os matrix was pure
ceremony. Use runs-on: ubuntu-latest directly.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add macos-latest to the build_wheels matrix and configure separate
arm64/x86_64 macOS wheels (arm64 built natively, x86_64 cross-compiled).
Enable PyPy in cibuildwheel (opt-in since 4.x; gives pp311) and skip the
free-threaded cp314t builds, keeping the shipped set aligned with the
tested matrix.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ewjoachim
ewjoachim merged commit 1fb73ab into botify-labs:main Jun 23, 2026
17 checks passed
@ewjoachim
ewjoachim deleted the build-manylinux-wheels branch June 23, 2026 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Build manylinux wheels

2 participants