From 869cd181b5d819c3cd25e899e192446d95df21b5 Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Sat, 20 May 2023 23:31:49 +0800 Subject: [PATCH 1/2] gh-104692: Include commoninstall as a prerequisite for bininstall This ensures that `commoninstall` is completed before `bininstall` is started when parallel builds are used (`make -j install`), and so the `python3` symlink is only installed after all standard library modules are installed. --- Makefile.pre.in | 2 +- .../Build/2023-05-20-23-49-30.gh-issue-104692.s5UIu5.rst | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 Misc/NEWS.d/next/Build/2023-05-20-23-49-30.gh-issue-104692.s5UIu5.rst diff --git a/Makefile.pre.in b/Makefile.pre.in index da3a8f6c13f90b..ab8a88d63a6b4c 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -1980,7 +1980,7 @@ altbininstall: $(BUILDPYTHON) @FRAMEWORKPYTHONW@ fi .PHONY: bininstall -bininstall: altbininstall +bininstall: commoninstall altbininstall if test ! -d $(DESTDIR)$(LIBPC); then \ echo "Creating directory $(LIBPC)"; \ $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$(LIBPC); \ diff --git a/Misc/NEWS.d/next/Build/2023-05-20-23-49-30.gh-issue-104692.s5UIu5.rst b/Misc/NEWS.d/next/Build/2023-05-20-23-49-30.gh-issue-104692.s5UIu5.rst new file mode 100644 index 00000000000000..2936990999e1aa --- /dev/null +++ b/Misc/NEWS.d/next/Build/2023-05-20-23-49-30.gh-issue-104692.s5UIu5.rst @@ -0,0 +1,6 @@ +Include ``commoninstall`` as a prerequisite for ``bininstall`` + +This ensures that ``commoninstall`` is completed before ``bininstall`` +is started when parallel builds are used (``make -j install``), and so +the ``python3`` symlink is only installed after all standard library +modules are installed. From b41adc23f73cd4c294d973686f30840c5cb89091 Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Wed, 31 May 2023 22:06:16 +0800 Subject: [PATCH 2/2] Update Makefile.pre.in Add an explanation for why commoninstall is made a prerequisite of bininstall. Co-authored-by: Zachary Ware --- Makefile.pre.in | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile.pre.in b/Makefile.pre.in index ab8a88d63a6b4c..d20fab1825c784 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -1980,6 +1980,10 @@ altbininstall: $(BUILDPYTHON) @FRAMEWORKPYTHONW@ fi .PHONY: bininstall +# We depend on commoninstall here to make sure the installation is already usable +# before we possibly overwrite the global 'python3' symlink to avoid causing +# problems for anything else trying to run 'python3' while we install, particularly +# if we're installing in parallel with -j. bininstall: commoninstall altbininstall if test ! -d $(DESTDIR)$(LIBPC); then \ echo "Creating directory $(LIBPC)"; \