Skip to content
Snippets Groups Projects
Commit 94c0c362 authored by Matt Harbison's avatar Matt Harbison
Browse files

hghave: fix the definition of `python3` to work on Windows

Both py2 and py3 executables are named `python.exe`, and may or may not be on
PATH.  So use the dispatcher executable that comes with py3 to fetch the version
of the latest py3 executable.  This allows at least one relnotes test to run on
Windows.

Differential Revision: https://phab.mercurial-scm.org/D10694
parent 5b351317
No related branches found
No related tags found
No related merge requests found
......@@ -863,7 +863,10 @@
@check("py3exe", "a Python 3.x interpreter is available")
def has_python3exe():
return matchoutput('python3 -V', br'^Python 3.(5|6|7|8|9)')
py = 'python3'
if os.name == 'nt':
py = 'py -3'
return matchoutput('%s -V' % py, br'^Python 3.(5|6|7|8|9)')
@check("pure", "running with pure Python code")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment