Skip to content

build: PyPI release workflow with abi3 wheels for 5 platforms - #7

Merged
asjad2401 merged 1 commit into
mainfrom
feat/release-wheels
Oct 11, 2026
Merged

asjad2401 merged 1 commit into
mainfrom
feat/release-wheels

Conversation

@asjad2401

Copy link
Copy Markdown
Owner

Summary

Makes pip install burn-python possible.

  • .github/workflows/release.yml
    • abi3 wheels (one per platform, any Python ≥ 3.9) for Linux x86_64 / aarch64 (manylinux_2_28), macOS arm64 / x86_64, Windows x86_64, plus an sdist.
    • Every wheel that can run on its runner is installed into a clean venv and runs tests/test_ops.py on Python 3.9 and 3.13 (macOS x86_64 is cross-compiled on arm64, so it's build-only).
    • Pushing a vX.Y.Z tag publishes to PyPI via trusted publishing (no API token stored); the tag is checked against Cargo.toml's version first.
    • PRs that touch packaging files run build + test only — this PR exercises the whole matrix.
  • abi3 (pyo3/abi3-py39): checked locally — the same wheel imports and passes the op tests on Python 3.9 and 3.13, flex and wgpu.
  • License fix: LICENSE was GPL-3.0 while pyproject.toml and the README said MIT OR Apache-2.0. Now LICENSE-MIT + LICENSE-APACHE (canonical text from apache.org), matching Burn.
  • Metadata: PEP 639 license expression, README as long description, URLs (incl. the Burn RFC), classifiers. Version is read from Cargo.toml only.
  • Cargo.lock committed, release builds use --locked so wheels are reproducible.

Before the first release (one-time, on pypi.org)

Add a pending trusted publisher for project burn-python: owner asjad2401, repo burn-python, workflow release.yml, environment pypi. Then git tag v0.1.0 && git push origin v0.1.0.

🤖 Generated with Claude Code

- release.yml builds abi3 wheels (Python >= 3.9) for linux x86_64/aarch64
  (manylinux_2_28), macOS arm64/x86_64 and Windows x86_64, plus an sdist.
  Each runnable wheel is installed and tested on Python 3.9 and 3.13.
  Pushing a vX.Y.Z tag (checked against Cargo.toml) publishes to PyPI
  via trusted publishing; PRs touching packaging build + test only.
- Enable pyo3 abi3-py39: one wheel per platform instead of per Python.
- License files now match the declared MIT OR Apache-2.0 (the GPL-3.0
  LICENSE file contradicted pyproject and README).
- Full PyPI metadata (PEP 639 license expression, readme, urls,
  classifiers); version comes from Cargo.toml only.
- Commit Cargo.lock; release builds use --locked.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@asjad2401
asjad2401 merged commit 7f7374b into main Oct 11, 2026
17 of 18 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