[Python-checkins] [3.11] gh-104692: Include commoninstall as a prerequisite for bininstall (GH-104693) (#105429)

ambv webhook-mailer at python.org
Wed Jul 5 06:51:30 EDT 2023


https://github.com/python/cpython/commit/6c6a2a9143c301bd6101fb18fd7f3b96adafc43c
commit: 6c6a2a9143c301bd6101fb18fd7f3b96adafc43c
branch: 3.11
author: Jeffery To <jeffery.to at gmail.com>
committer: ambv <lukasz at langa.pl>
date: 2023-07-05T12:51:26+02:00
summary:

[3.11] gh-104692: Include commoninstall as a prerequisite for bininstall (GH-104693) (#105429)

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.

.
(cherry picked from commit 990cb3676c2edb7e5787372d6cbe360a73367f4c)

Co-authored-by: Erlend E. Aasland <erlend.aasland at protonmail.com>

files:
A Misc/NEWS.d/next/Build/2023-05-20-23-49-30.gh-issue-104692.s5UIu5.rst
M Makefile.pre.in

diff --git a/Makefile.pre.in b/Makefile.pre.in
index 3ea8653de0069..3948184ad8ea3 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -1839,7 +1839,11 @@ altbininstall: $(BUILDPYTHON) @FRAMEWORKPYTHONW@
 			$(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE); \
 	fi
 
-bininstall: altbininstall
+# 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)"; \
 		$(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 0000000000000..2936990999e1a
--- /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.



More information about the Python-checkins mailing list