Patchwork D7258: makefile: use Python 3 by default (BC)

login
register
mail settings
Submitter phabricator
Date Nov. 22, 2019, 3:02 a.m.
Message ID <4b6e48891a1049a7982f0cbfcc07f9e6@localhost.localdomain>
Download mbox | patch
Permalink /patch/43405/
State Not Applicable
Headers show

Comments

phabricator - Nov. 22, 2019, 3:02 a.m.
indygreg updated this revision to Diff 18277.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7258?vs=18276&id=18277

BRANCH
  default

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7258/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7258

AFFECTED FILES
  Makefile

CHANGE DETAILS




To: indygreg, #hg-reviewers, martinvonz
Cc: yuja, mharbison72, durin42, dlax, martinvonz, mercurial-devel

Patch

diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,14 @@ 
 # % make PREFIX=/opt/ install
 
 export PREFIX=/usr/local
-PYTHON?=python
+
+# There is no python3.exe on Windows. So use the py.exe wrapper.
+ifeq ($(OS),Windows_NT)
+PYTHON?=py -3
+else
+PYTHON?=python3
+endif
+
 $(eval HGROOT := $(shell pwd))
 HGPYTHONS ?= $(HGROOT)/build/pythons
 PURE=