]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-104692: Include commoninstall as a prerequisite for bininstall (#104693)
authorJeffery To <jeffery.to@gmail.com>
Wed, 7 Jun 2023 06:59:56 +0000 (14:59 +0800)
committerGitHub <noreply@github.com>
Wed, 7 Jun 2023 06:59:56 +0000 (08:59 +0200)
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.

Co-authored-by: Zachary Ware <zachary.ware@gmail.com>
Makefile.pre.in
Misc/NEWS.d/next/Build/2023-05-20-23-49-30.gh-issue-104692.s5UIu5.rst [new file with mode: 0644]

index ae428ebb9a25f3175cf22fc91d73a8cf5cbb8bb1..a9c53bae4bf63c5e94b6217dc83bd25d3e12294a 100644 (file)
@@ -2017,7 +2017,11 @@ altbininstall: $(BUILDPYTHON) @FRAMEWORKPYTHONW@
        fi
 
 .PHONY: bininstall
-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 (file)
index 0000000..2936990
--- /dev/null
@@ -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.