aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2019-07-10 11:17:32 -0700
committerDylan Baker <dylan@pnwbakers.com>2019-07-15 10:59:22 -0700
commit7803056ef2a17c5a706335bcd876d31baf614280 (patch)
tree991e490a4b44713ae00ffc791a828121d59182bc
parent42d34095b4a95c0e3ea1c3c5b4810d154aeef094 (diff)
downloadmeson-7803056ef2a17c5a706335bcd876d31baf614280.zip
meson-7803056ef2a17c5a706335bcd876d31baf614280.tar.gz
meson-7803056ef2a17c5a706335bcd876d31baf614280.tar.bz2
run_unittests: use sys.executable on Windows for python
Instead of trying to guess whether we need py or python3, and then falling over when whatever we guessed isn't in the path or isn't right, just use sys.executable which should always work.
-rwxr-xr-xrun_unittests.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/run_unittests.py b/run_unittests.py
index 793e326..93c9083 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -5926,10 +5926,7 @@ class NativeFileTests(BasePlatformTests):
# invokes our python wrapper
batfile = os.path.join(self.builddir, 'binary_wrapper{}.bat'.format(self.current_wrapper))
with open(batfile, 'wt') as f:
- if mesonbuild.environment.detect_msys2_arch():
- f.write(r'@python3 {} %*'.format(filename))
- else:
- f.write('@{} {} %*'.format(sys.executable, filename))
+ f.write(r'@{} {} %*'.format(sys.executable, filename))
return batfile
def helper_for_compiler(self, lang, cb, for_machine = MachineChoice.HOST):