diff options
author | Christian Heimes <christian@python.org> | 2021-11-18 08:18:44 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-18 08:18:44 (GMT) |
commit | 25ecc040d007a55e4b5c30fa739054b52c1aacac (patch) | |
tree | a804c5fba2fba0e13a45dbd723eafee1f08f833f /Modules/Setup | |
parent | fc4474e45eecbea8e88095f28c98c5d56438d841 (diff) | |
download | cpython-25ecc040d007a55e4b5c30fa739054b52c1aacac.zip cpython-25ecc040d007a55e4b5c30fa739054b52c1aacac.tar.gz cpython-25ecc040d007a55e4b5c30fa739054b52c1aacac.tar.bz2 |
bpo-45573: Introduce extension module flags in Makefile (GH-29594)
``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>
Diffstat (limited to 'Modules/Setup')
-rw-r--r-- | Modules/Setup | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/Modules/Setup b/Modules/Setup index 608866d..414c6af 100644 --- a/Modules/Setup +++ b/Modules/Setup @@ -42,6 +42,15 @@ # You can also use any Make variable that is detected by configure and # defined in Makefile.pre.in, e.g. OpenSSL flags $(OPENSSL_INCLUDES). # +# Rules generated by makesetup use additional variables: +# +# - All source file rules have a dependency on $(PYTHON_HEADERS) and on +# optional variable $(MODULES_{mod_upper}_DEPS). +# - If no <cpparg> and no <library> arguments are given, then makesetup +# defaults to $(MODULES_{mod_upper}_CFLAGS) cppargs and +# $(MODULES_{mod_upper}_LDFLAGS) libraries. The variables are typically +# defined by configure. +# # The build process works like this: # # 1. Build all modules that are declared as static in Modules/Setup, @@ -149,7 +158,7 @@ time timemodule.c #_contextvars _contextvarsmodule.c #_csv _csv.c #_datetime _datetimemodule.c -#_decimal _decimal/_decimal.c $(DECIMAL_CFLAGS) $(DECIMAL_LDFLAGS) +#_decimal _decimal/_decimal.c #_heapq _heapqmodule.c #_json _json.c #_lsprof _lsprof.c rotatingtree.c @@ -172,8 +181,8 @@ time timemodule.c #select selectmodule.c # XML -#_elementtree _elementtree.c $(EXPAT_CFLAGS) -#pyexpat pyexpat.c $(EXPAT_CFLAGS) $(EXPAT_LDFLAGS) +#_elementtree _elementtree.c +#pyexpat pyexpat.c # hashing builtins #_blake2 _blake2/blake2module.c _blake2/blake2b_impl.c _blake2/blake2s_impl.c |