PyO3 / maturin

Build and publish crates with pyo3, cffi and uniffi bindings as well as rust binaries as python packages
https://maturin.rs
Apache License 2.0
3.98k stars 275 forks source link

Support building free-threaded wheels #2315

Closed ngoldbaum closed 3 days ago

ngoldbaum commented 1 week ago

While working on https://github.com/crate-py/rpds/issues/101 I discovered that maturin can't build free-threaded wheels:

± maturin build --target aarch64-apple-darwin --release --out dist --interpreter 3.9 3.10 3.11 3.12 3.13 3.13t pypy3.9 pypy3.10
📦 Including license file "/Users/goldbaum/Documents/rpds-py/LICENSE"
🔗 Found pyo3 bindings
⚠️  Warning: skipped unavailable python interpreter 'pypy3.10' from pyenv
💥 maturin failed
  Caused by: Invalid python interpreter minor version '13t', expect a digit
  Caused by: invalid digit found in string

I'm not sure if there are other issues besides that there isn't a UI to do this, I don't know much about how maturin works.

It might be helpful to look at what @henryiii and @mayeut did to get cibuildwheel working with the free-threaded build: https://github.com/pypa/cibuildwheel/pull/1831

davidhewitt commented 1 week ago

This is already underway in #2310 😁

davidhewitt commented 1 day ago

@messense is there anything remaining to do before this can be released? I'm happy to offer help if there is, would love to see a free-threaded compatible maturin so that we can start shipping 🛥️

messense commented 1 day ago

Opened https://github.com/PyO3/maturin/pull/2322

davidhewitt commented 1 day ago

🙏 amazing, thanks!