-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
bpo-32232: by default, Setup modules are no longer built with -DPy_BUILD_CORE #6489
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
3 changes: 3 additions & 0 deletions
3
Misc/NEWS.d/next/Build/2018-04-17-00-38-19.bpo-32232.o7G_UO.rst
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
By default, modules configured in `Modules/Setup` are no longer built with | ||
`-DPy_BUILD_CORE`. Instead, modules that specifically need that preprocessor | ||
definition include it in their individual entries. |
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Obviously errnomodule.c does not need to be compiled with -DPy_BUILD_CORE. But is it possible that other modules in this list that build correctly now with a standard linux platform without -DPy_BUILD_CORE, may need to be build with -DPy_BUILD_CORE given some specific set of macros in pyconfig.h ? Maybe it is safer then to use -DPy_BUILD_CORE for all modules currently statically built in the interpreter (and leave the commented out modules unchanged as they are built without -DPy_BUILD_CORE in setup.py).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can treat those cases as bug reports as folks using custom
pyconfig.h
files start looking at building 3.7 based versions. (Of all the ones listed, the main one I'm surprised was able to build without-DPy_BUILD_CORE
is_weakref
).The other case where I think it would make sense to reconsider omitting the setting is if this change turns out to be a performance regression.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant that on another platform than linux, the configure stage may define a macro in
pyconfig.h
that causes one of the modules where-DPy_BUILD_CORE
is not used in the current PR (because the build does not fail for this module on linux) to require direct access to the interpreter internal for this platform. Maybe this is far-fetched.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noting the resolution of this here: https://bugs.python.org/issue32232#msg315515 (Xavier checked the modules for symbols defined in pyconfig.h.in, and this concern turns out not to apply in practice)