Release Python Package
Publish the PyO3 / maturin wheel to PyPI. Linux releases must be manylinux wheels.
Script (preferred)
From the repository root:
# Build manylinux_2_28 wheels for x86_64 + aarch64 via zig
bash scripts/release/python.sh
# Build only one arch
bash scripts/release/python.sh --arch x86_64
# Build natively on a Linux host (no zig cross-compile)
bash scripts/release/python.sh --native
# Upload to PyPI
export MATURIN_PYPI_TOKEN=...
bash scripts/release/python.sh --publish
| Flag | Meaning |
|---|---|
--arch x86_64|aarch64|all | Which Linux arch to build (default: both) |
--manylinux 2_28|2_17 | manylinux tag (default: 2_28) |
--native | Build on the current Linux host without zig |
--publish | Upload bindings/python/dist/*.whl to PyPI |
--skip-build | Do not rebuild; only upload |
Checklist
- Bump
versionin rootCargo.tomlandbindings/python/Cargo.toml(keep identical). - Update changelogs.
- Ensure CI is green on
main. - Run the script above.
- Tag and push:
git tag py-v0.1.9
git push origin py-v0.1.9
The wheel is abi3-py39: one wheel per platform covers CPython 3.9+. Prefer
manylinux for Linux; Windows win_amd64 wheels are produced by
ci_bindings_python.yml on windows-latest. Never commit tokens.