D11045: run-tests: cleanup windows generation of the python / python3 pointeur
marmoute (Pierre-Yves David)
phabricator at mercurial-scm.org
Sat Jul 10 00:38:34 UTC 2021
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
REVISION SUMMARY
They are no need to generate then in RUNTESTDIR and we don't need a python2
executable. (because not test ever use `python2` explicitly)
REPOSITORY
rHG Mercurial
BRANCH
default
REVISION DETAIL
https://phab.mercurial-scm.org/D11045
AFFECTED FILES
tests/run-tests.py
CHANGE DETAILS
diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -3587,13 +3587,15 @@
# simple script on PATH with that name that delegates to the py3
# launcher so the shebang lines work.
if os.getenv('MSYSTEM'):
- with open(osenvironb[b'RUNTESTDIR'] + b'/python3', 'wb') as f:
+ py3exe_name = os.path.join(self._custom_bin_dir, b'python3')
+ with open(py3exe_name, 'wb') as f:
f.write(b'#!/bin/sh\n')
f.write(b'py -3.%d "$@"\n' % sys.version_info[1])
- if os.getenv('MSYSTEM'):
- with open(osenvironb[b'RUNTESTDIR'] + b'/python2', 'wb') as f:
+
+ pyexe_name = os.path.join(self._custom_bin_dir, b'python2')
+ with open(pyexe_name, 'wb') as f:
f.write(b'#!/bin/sh\n')
- f.write(b'py -2.%d "$@"\n' % sys.version_info[1])
+ f.write(b'py -%d.%d "$@"\n' % sys.version_info[0:2])
exedir, exename = os.path.split(sysexecutable)
for pyexename in pyexe_names:
To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
More information about the Mercurial-devel
mailing list