-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
bpo-45573: Introduce extension module flags in Makefile (GH-29594) #29594
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
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 <[email protected]>
6eb4638
to
23986fc
Compare
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.
Great work! LG
# not available on current platform | ||
pass | ||
else: | ||
# not migrated to MODULE_{name} yet. |
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.
Perhaps print an info message?
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.
Good thinking, I plan to add an error message after we have ported all stdlib modules to new system.
if cflags: | ||
for token in shlex.split(cflags): |
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.
Ah, it would have been convenient to be able write for token in shlex.split(cflags) if cflags:
:)
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.
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.
``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 <[email protected]>
configure
now uses a standardized format to forward state, compilerflags, and linker flags to
Makefile
,setup.py
, andModules/Setup
.makesetup
use the new variables by default if amodule 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/aMODULE_EGG_CFLAGS
MODULE_EGG_LDFLAGS
Makefile.pre.in
may also provideMODULE_EGG_DEPS
that listsdependencies such as header files and static libs.
Signed-off-by: Christian Heimes [email protected]
https://bugs.python.org/issue45573