Skip to content

If an interpreter is available, use it, even when building ABI3.#2829

Merged
messense merged 4 commits intoPyO3:mainfrom
freakboy3742:abi3-real-interpreter
Nov 10, 2025
Merged

If an interpreter is available, use it, even when building ABI3.#2829
messense merged 4 commits intoPyO3:mainfrom
freakboy3742:abi3-real-interpreter

Conversation

@freakboy3742
Copy link
Copy Markdown
Contributor

At present, when targeting an abi3 build, Maturin will use a dummy interpreter to provide build configuration details, unless the user specifies an interpreter with --interpreter, or the target is cross-compiling, or Windows is being targeted.

The use of a dummy interpreter when a real interpreter is available can lead to the interpreter details that are available and defined in sysconfigdata not being used as part of the build process.

This was discovered in the process of working on iOS support (see #2827 and #2828); although the iOS build environment does provide build configuration details, those details were not being passed down to the PyO3 build configuration. With those two patches (and some patches to PyO3 - see PyO3/pyo3#5605 and PyO3/pyo3#5606), it was possible to build a non-abi3 wheel; but this patch was needed to build an abi3 wheel.

@messense messense merged commit a41bc86 into PyO3:main Nov 10, 2025
45 checks passed
@freakboy3742 freakboy3742 deleted the abi3-real-interpreter branch November 10, 2025 01:36
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.

2 participants