Open alex opened 9 months ago
What's the motivation for targeting multiple abi3 versions instead of the lowest supported?
To be able to take advantage of improvements (e.g. performance) on newer versions, while maintaining compatibility.
The specific improvement that motivated us to do this was https://github.com/PyO3/pyo3/blob/main/src/impl_/pymodule.rs#L83-L119
I think it's already possible by using MATURIN_PEP517_ARGS
env var or --config-settings
, for example
pip wheel --config-settings=build-args='--features abi3-py312'
Ah, that will be respected? Let me test it. Thanks!
Hmm, it fails when building an sdist with:
Caused by: You have selected the
abi3
feature but not a minimum version (e.g. theabi3-py36
feature). maturin needs a minimum version feature to build abi3 wheels.
I guess it fails everywhere except the places I passed that argument.
To follow up on this, it's missing a key element that setuptools-rust "auto" provides: using abi3 with the current python if nothing is explicitly provided.
Do you think support for something like "auto" abi3, where it used the current Python's version is possible?
Do you think support for something like "auto" abi3, where it used the current Python's version is possible?
I think we can support this, we can change maturin to use the current Python's version when abi3
feature is enabled without an explicit abi3-pyXY
feature, and print a message about this behavior of course.
Currently the way to set abi3 version is via applying a versioned-feature in
Cargo.toml
(e.g.,abi3-py312
).I'm requesting a way set that at the CLI. The reason for this is to be able to build wheels targeting multiple abi3 versions from the same source.
We're currently able to do this with
setuptools-rust
with the following command: