mirror of
https://github.com/python/cpython.git
synced 2024-11-23 18:04:37 +08:00
bpo-47146: Stop Depending On regen-deepfreeze For regen-global-objects (gh-32218)
This effectively reverts the Makefile change in gh-31637. I've added some notes so it is more clear what is going on. We also update the "Check if generated files are up to date" job to run "make regen-deepfreeze" to ensure "make regen-global-objects" catches deepfreeze.c. https://bugs.python.org/issue47146
This commit is contained in:
parent
74b95d86e0
commit
e7bb7c2f04
3
.github/workflows/build.yml
vendored
3
.github/workflows/build.yml
vendored
@ -82,6 +82,9 @@ jobs:
|
||||
run: make regen-configure
|
||||
- name: Build CPython
|
||||
run: |
|
||||
# Deepfreeze will usually cause global objects to be added or removed,
|
||||
# so we run it before regen-global-objects gets rum (in regen-all).
|
||||
make regen-deepfreeze
|
||||
make -j4 regen-all
|
||||
make regen-stdlib-module-names
|
||||
- name: Check for changes
|
||||
|
@ -1161,8 +1161,9 @@ Python/deepfreeze/deepfreeze.c: $(DEEPFREEZE_DEPS)
|
||||
Python/frozen_modules/__phello__.spam.h:__phello__.spam \
|
||||
Python/frozen_modules/frozen_only.h:frozen_only \
|
||||
-o Python/deepfreeze/deepfreeze.c
|
||||
|
||||
# END: deepfreeze modules
|
||||
@echo "Note: Deepfreeze may have added some global objects,"
|
||||
@echo " so run 'make regen-global-objects' if necessary."
|
||||
|
||||
# We keep this renamed target around for folks with muscle memory.
|
||||
.PHONY: regen-importlib
|
||||
@ -1171,24 +1172,11 @@ regen-importlib: regen-frozen
|
||||
############################################################################
|
||||
# Global objects
|
||||
|
||||
GLOBAL_OBJECTS_TARGETS = \
|
||||
$(srcdir)/Include/internal/pycore_global_objects.h \
|
||||
$(srcdir)/Include/internal/pycore_global_strings.h
|
||||
|
||||
# The global objects will get regenerated as soon these files
|
||||
# are required, including as a prerequisite for regen-deepfreeze.
|
||||
$(GLOBAL_OBJECTS_TARGETS): generate-global-objects
|
||||
|
||||
.PHONY: generate-global-objects
|
||||
generate-global-objects: $(srcdir)/Tools/scripts/generate_global_objects.py
|
||||
$(PYTHON_FOR_REGEN) $(srcdir)/Tools/scripts/generate_global_objects.py
|
||||
|
||||
.PHONY: generate-global-objects-after-deepfreeze
|
||||
generate-global-objects-after-deepfreeze: regen-deepfreeze $(srcdir)/Tools/scripts/generate_global_objects.py
|
||||
$(PYTHON_FOR_REGEN) $(srcdir)/Tools/scripts/generate_global_objects.py
|
||||
|
||||
.PHONY: regen-global-objects
|
||||
regen-global-objects: regen-deepfreeze generate-global-objects-after-deepfreeze
|
||||
regen-global-objects: $(srcdir)/Tools/scripts/generate_global_objects.py
|
||||
$(PYTHON_FOR_REGEN) $(srcdir)/Tools/scripts/generate_global_objects.py
|
||||
@echo "Note: Global objects can be added or removed by other tools (e.g. deepfreeze), "
|
||||
@echo " so be sure to re-run regen-global-objects after those tools."
|
||||
|
||||
############################################################################
|
||||
# ABI
|
||||
|
@ -606,7 +606,6 @@ def regen_makefile(modules):
|
||||
])
|
||||
deepfreezerules.append(f"\t{frozen_header}:{src.frozenid} \\")
|
||||
deepfreezerules.append('\t-o Python/deepfreeze/deepfreeze.c')
|
||||
deepfreezerules.append('')
|
||||
pyfiles[-1] = pyfiles[-1].rstrip(" \\")
|
||||
frozenfiles[-1] = frozenfiles[-1].rstrip(" \\")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user