Mercurial > hg-stable
changeset 52196:7a568296296e stable
windows: simply rely on the PATH adjustment to find python.exe in tests
The shell script under a `.exe` name confused Windows outside MSYS and give us
the following error:
[…]/python.exe is not compatible with the version of Windows you're running. Check your computer's system information and then contact the software publisher.
This is necessary to get the wheel variant of the test run to work properly.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sun, 10 Nov 2024 22:30:02 +0100 |
parents | 4bbb4fc9af3b |
children | d0e728b0db0e |
files | tests/run-tests.py |
diffstat | 1 files changed, 3 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/run-tests.py Sun Nov 10 02:39:27 2024 +0100 +++ b/tests/run-tests.py Sun Nov 10 22:30:02 2024 +0100 @@ -3779,10 +3779,7 @@ def _usecorrectpython(self): """Configure the environment to use the appropriate Python in tests.""" # Tests must use the same interpreter as us or bad things will happen. - if WINDOWS: - pyexe_names = [b'python', b'python3', b'python.exe'] - else: - pyexe_names = [b'python', b'python3'] + pyexe_names = [b'python', b'python3'] # os.symlink() is a thing with py3 on Windows, but it requires # Administrator rights. @@ -3823,7 +3820,8 @@ f.write(b'%s "$@"\n' % esc_executable) if WINDOWS: - # adjust the path to make sur the main python finds it own dll + # adjust the path to make sur the main python finds itself and + # its own dll path = os.environ['PATH'].split(os.pathsep) main_exec_dir = os.path.dirname(sysexecutable) extra_paths = [_bytes2sys(self._custom_bin_dir), main_exec_dir]