Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit aed9773

Browse files
committed
Issue #14605 and #14642: Issue a warning in case Python\importlib.h needs to
be rebuilt, but there's no Python interpreter around to freeze the bootstrap script. Forgot to include Makefile.pre.in in changeset 76549:acfdf46b8de1.
1 parent ae77584 commit aed9773

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

Makefile.pre.in

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -573,12 +573,23 @@ Modules/Setup: $(srcdir)/Modules/Setup.dist
573573

574574
Modules/_testembed: Modules/_testembed.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY)
575575
$(LINKCC) $(PY_LDFLAGS) $(LINKFORSHARED) -o $@ Modules/_testembed.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
576+
576577
############################################################################
577578
# Importlib
578579

579580
Python/importlib.h: $(srcdir)/Lib/importlib/_bootstrap.py $(srcdir)/Python/freeze_importlib.py
580-
./$(BUILDPYTHON) $(srcdir)/Python/freeze_importlib.py \
581-
$(srcdir)/Lib/importlib/_bootstrap.py Python/importlib.h
581+
@if test -f ./$(BUILDPYTHON); then \
582+
./$(BUILDPYTHON) $(srcdir)/Python/freeze_importlib.py \
583+
$(srcdir)/Lib/importlib/_bootstrap.py Python/importlib.h; \
584+
else \
585+
echo "----------------------------------------------------------"; \
586+
echo "Python/importlib.h needs to be rebuilt, but no interpreter"; \
587+
echo "is available to do so. Leaving the previous version in"; \
588+
echo "place. You may want to run ''make'' a second time after"; \
589+
echo "this build is complete."; \
590+
echo "----------------------------------------------------------"; \
591+
fi
592+
582593
############################################################################
583594
# Special rules for object files
584595

0 commit comments

Comments
 (0)