Skip to content
Snippets Groups Projects
Commit 7a568296296e authored by Pierre-Yves David's avatar Pierre-Yves David :octopus:
Browse files

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.
parent 4bbb4fc9af3b
No related branches found
No related tags found
2 merge requests!1083Merge stable into default,!1068preparation for Windows Wheel building
......@@ -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]
......
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