Replies: 1 comment
-
|
No — maturin does not produce abi3 wheels for the Where this is decided in the codeThe wheel-tag logic for // src/build_orchestrator.rs:797-803
let tag = match (self.context.project.bridge(), python_interpreter) {
(BridgeModel::Bin(None), _) => self.get_universal_tag(platform_tags)?,
(BridgeModel::Bin(Some(..)), Some(python_interpreter)) => {
python_interpreter.get_tag(&self.context.project, platform_tags)?
}
_ => unreachable!(),
};For The driver that decides how many wheels to build is at BridgeModel::Bin(None) => self.build_bin_wheel(None, &sbom_data)?,
BridgeModel::Bin(Some(..)) => self.build_bin_wheels(&interpreters, &sbom_data)?, // one per interpreter
BridgeModel::PyO3(crate::PyO3 { stable_abi, .. }) => match stable_abi {
Some(stable_abi) => self.build_stable_abi_wheels(stable_abi, &sbom_data)?, // single abi3 wheel
...
}
There is one place — Why it isn't supportedThis is a real semantic mismatch, not just a missing flag:
So there isn't a quick "just emit the abi3 tag for bin too" fix — making this work would require maturin's bin path to either (a) link against the limited-API stub library ( What you can actually do today
Bottom lineYour config is fine; you have not missed a flag. maturin currently builds version-specific wheels for any References (file:line)
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I've enabled the
abi3feature forpyo3per Bindings doc and pyo3's Building and distribution.Cargo dependency config:
However, I have not met Step 3, "Ensure that the .whl is correctly marked as abi3". As I'm using maturin I'm assuming it would handle when it detects the feature. The step refers to setting
--py-limited-api=cp3xbut for setuptools. Is there something here I need to specify for maturin, beyond theabi3-py310feature inCargo.toml?In the tutorial output, maturin shows:
I've only ever seen:
I'm seeing the same behavior on both Linux and macOS.
This is for a binary crate in Rust that calls
Python::initialize().UPDATE: I see I misread the docs. The steps above refer to extension modules. As I'm building a bin (Rust program that uses Python) these don't seem to apply in my case. I would still think it possible to create an abi3 wheel but maturin seems to not apply this config for bin bindings.
Beta Was this translation helpful? Give feedback.
All reactions