makefile: use Python 3 by default (BC)
authorGregory Szorc <gregory.szorc@gmail.com>
Mon, 05 Oct 2020 19:46:31 -0700
changeset 45821 c2837640aeb0
parent 45820 ee826f43cf4f
child 45822 61d63a774490
makefile: use Python 3 by default (BC) This change is long overdue IMO. .. bc:: Makefile now uses `python3` instead of `python` by default on non-Windows platforms. This means Mercurial will be built and run with Python 3 instead of Python 2.7 by default. To continue using Python 2, set the PYTHON variable. e.g. `make install PYTHON=python2.7`. Differential Revision: https://phab.mercurial-scm.org/D7258
Makefile
--- a/Makefile	Tue Nov 03 20:28:23 2020 -0800
+++ b/Makefile	Mon Oct 05 19:46:31 2020 -0700
@@ -5,7 +5,16 @@
 # % make PREFIX=/opt/ install
 
 export PREFIX=/usr/local
+
+# Default to Python 3.
+#
+# Windows ships Python 3 as `python.exe`.
+ifeq ($(OS),Windows_NT)
 PYTHON?=python
+else
+PYTHON?=python3
+endif
+
 $(eval HGROOT := $(shell pwd))
 HGPYTHONS ?= $(HGROOT)/build/pythons
 PURE=