aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/mesonlib.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2017-10-15 21:48:03 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2017-11-20 23:08:17 +0200
commit9d67e5030b6c86ce33f43ae7a5b827f299d68a3e (patch)
treeff5f539482b51c48a8d8b4b90cf2ba93c2909157 /mesonbuild/mesonlib.py
parenta437cd1955186060a8c5768fef739830d2711d0c (diff)
downloadmeson-9d67e5030b6c86ce33f43ae7a5b827f299d68a3e.zip
meson-9d67e5030b6c86ce33f43ae7a5b827f299d68a3e.tar.gz
meson-9d67e5030b6c86ce33f43ae7a5b827f299d68a3e.tar.bz2
Changed code to use detected executables rather than hardcoding sys.executable.
Diffstat (limited to 'mesonbuild/mesonlib.py')
-rw-r--r--mesonbuild/mesonlib.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/mesonbuild/mesonlib.py b/mesonbuild/mesonlib.py
index f74c6c1..35aa036 100644
--- a/mesonbuild/mesonlib.py
+++ b/mesonbuild/mesonlib.py
@@ -22,6 +22,15 @@ import collections
from glob import glob
+if sys.executable.endswith('meson.exe'):
+ # In Windows and using the MSI installed executable.
+ meson_command = [sys.executable]
+ python_command = [sys.executable, 'runpython']
+else:
+ meson_command = [sys.executable, os.path.join(os.path.split(__file__)[0], '..', 'meson.py')]
+ python_command = [sys.executable]
+
+
# Put this in objects that should not get dumped to pickle files
# by accident.
import threading