diff --git a/Modules/Setup.bootstrap.in b/Modules/Setup.bootstrap.in index 65a1fefe72e92e..1d1de43fd8f05b 100644 --- a/Modules/Setup.bootstrap.in +++ b/Modules/Setup.bootstrap.in @@ -1,5 +1,9 @@ # -*- makefile -*- +# Mark bootstrap modules explicitly so older Makefile recipes work +# without passing -b to makesetup (gh-161364). +*bootstrap* + # --- # Built-in modules required to get a functioning interpreter; # cannot be built as shared! diff --git a/Modules/makesetup b/Modules/makesetup index 932c0952e4781d..4b2d4fad02e10b 100755 --- a/Modules/makesetup +++ b/Modules/makesetup @@ -19,7 +19,8 @@ set -e # The Setup file following a -b option holds the *bootstrap* modules: # the static modules that the build helper programs (_freeze_module, # _bootstrap_python) are linked with. They are also regular modules of -# the final build. +# the final build. A *bootstrap* line in a Setup file does the same for +# the rest of that file. # Setup files after a -n option are used for their variables, modules # and libraries but not for their .o files. # diff --git a/Tools/build/check_extension_modules.py b/Tools/build/check_extension_modules.py index c619a9a0c1c5a1..e907442b61ea22 100644 --- a/Tools/build/check_extension_modules.py +++ b/Tools/build/check_extension_modules.py @@ -421,7 +421,7 @@ def parse_setup_file(self, setup_file: pathlib.Path) -> Iterable[ModuleInfo]: state = ModuleState.BUILTIN case ["*disabled*"]: state = ModuleState.DISABLED - case ["*noconfig*"]: + case ["*noconfig*"] | ["*bootstrap*"]: continue case [*items]: if state == ModuleState.DISABLED: