Use standard extension configuration for CPython 3.12+#1180
Open
jjhelmus wants to merge 12 commits into
Open
Conversation
Configure pkgconf to report the temporary directories of the prefix that is used on macOS during CPython builds.
Build standard-library extensions through CPython's configure and Setup.stdlib mechanism for Python 3.12 and newer. Default to statically linking these modules into libpython/python with a few overrides speficied in a Setup.local file created from extension-modules.yaml. This allows CPython's extension checks to run. Python 3.11 and 3.10 contrinue to use the existing process to configure and build extension modules.
Configuration correctly detect the SIMD support in the toolchain and applies the appropiate flags when building libhacl.
jjhelmus
force-pushed
the
jjh/standard_mod_config_312
branch
from
July 21, 2026 15:03
2bc109e to
059aed0
Compare
zanieb
reviewed
Jul 21, 2026
These extensions were not enabled when using a custom build configuration + build. Maintain this policy.
…tion Reverts commit 059aed0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Switch CPython 3.12+ builds to the upstream Setup.stdlib extension-building mechanism while preserving the existing static/shared linkage behavior.
pkgconfon macOS to provide Tcl/Tk configuration to CPython.xxlimited_3_13extensions. c.f. Enable _testclinic, _testclinic_limited and xxlimited_3_13 #1185With this change,
extension-modules.ymlis still used for the following in CPython 3.12:Setup.stdlib.inPYTHON.jsonConstructing
PYTHON.jsonfor CPython 3.12+ from other sources would be a good follow up.Makes various patches unnecessary:
patch-checksharedmods-disable.patch#869patch-configure-disable-stdlib-mod-3.12.patch#875 (This patch is only applied on Python 3.11)patch-pwd-remove-conditional.patch#876 (this patch is only applied on Python 3.11)Configuration can now appropriately detect SIMD support in the toolchain and adjusts
libhaclflags accordingly.patch-python-configure-hacl-no-simd.patch#883This does not add shared extension suggested in #227. This could be done with a small change as a follow up.