bpo-45573: Introduce extension module flags in Makefile (GH-29594)#29594
Merged
tiran merged 1 commit intopython:mainfrom Nov 18, 2021
Merged
bpo-45573: Introduce extension module flags in Makefile (GH-29594)#29594tiran merged 1 commit intopython:mainfrom
tiran merged 1 commit intopython:mainfrom
Conversation
``configure`` now uses a standardized format to forward state, compiler flags, and linker flags to ``Makefile``, ``setup.py``, and ``Modules/Setup``. ``makesetup`` use the new variables by default if a module line does not contain any compiler or linker flags. ``setup.py`` has a new function ``addext()``. For a module ``egg``, configure adds: * ``MODULE_EGG`` with value yes, missing, disabled, or n/a * ``MODULE_EGG_CFLAGS`` * ``MODULE_EGG_LDFLAGS`` ``Makefile.pre.in`` may also provide ``MODULE_EGG_DEPS`` that lists dependencies such as header files and static libs. Signed-off-by: Christian Heimes <christian@python.org>
6eb4638 to
23986fc
Compare
erlend-aasland
approved these changes
Nov 17, 2021
| # not available on current platform | ||
| pass | ||
| else: | ||
| # not migrated to MODULE_{name} yet. |
Contributor
There was a problem hiding this comment.
Perhaps print an info message?
Member
Author
There was a problem hiding this comment.
Good thinking, I plan to add an error message after we have ported all stdlib modules to new system.
Comment on lines
+417
to
+418
| if cflags: | ||
| for token in shlex.split(cflags): |
Contributor
There was a problem hiding this comment.
Ah, it would have been convenient to be able write for token in shlex.split(cflags) if cflags: :)
Contributor
There was a problem hiding this comment.
You can for token in shlex.split(cflags) if cflags else (): if you really want to but I find the boring vanilla form less clever which is a Good Thing.
remykarem
pushed a commit
to remykarem/cpython
that referenced
this pull request
Dec 7, 2021
``configure`` now uses a standardized format to forward state, compiler flags, and linker flags to ``Makefile``, ``setup.py``, and ``Modules/Setup``. ``makesetup`` use the new variables by default if a module line does not contain any compiler or linker flags. ``setup.py`` has a new function ``addext()``. For a module ``egg``, configure adds: * ``MODULE_EGG`` with value yes, missing, disabled, or n/a * ``MODULE_EGG_CFLAGS`` * ``MODULE_EGG_LDFLAGS`` ``Makefile.pre.in`` may also provide ``MODULE_EGG_DEPS`` that lists dependencies such as header files and static libs. Signed-off-by: Christian Heimes <christian@python.org>
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.
configurenow uses a standardized format to forward state, compilerflags, and linker flags to
Makefile,setup.py, andModules/Setup.makesetupuse the new variables by default if amodule line does not contain any compiler or linker flags.
setup.pyhas a new function
addext().For a module
egg, configure adds:MODULE_EGGwith value yes, missing, disabled, or n/aMODULE_EGG_CFLAGSMODULE_EGG_LDFLAGSMakefile.pre.inmay also provideMODULE_EGG_DEPSthat listsdependencies such as header files and static libs.
Signed-off-by: Christian Heimes christian@python.org
https://bugs.python.org/issue45573