D10251: makefile: use Python 3 by default when building docs as well
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Mon Mar 22 22:35:38 UTC 2021
martinvonz created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
REVISION SUMMARY
I copied the snippet defining `PYTHON` from the root Makefile.
REPOSITORY
rHG Mercurial
BRANCH
default
REVISION DETAIL
https://phab.mercurial-scm.org/D10251
AFFECTED FILES
doc/Makefile
CHANGE DETAILS
diff --git a/doc/Makefile b/doc/Makefile
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -6,7 +6,14 @@
PREFIX=/usr/local
MANDIR=$(PREFIX)/share/man
INSTALL=install -m 644
-PYTHON?=python
+# Default to Python 3.
+#
+# Windows ships Python 3 as `python.exe`, which may not be on PATH. py.exe is.
+ifeq ($(OS),Windows_NT)
+PYTHON?=py -3
+else
+PYTHON?=python3
+endif
RSTARGS=
export HGENCODING=UTF-8
To: martinvonz, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
More information about the Mercurial-devel
mailing list