aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/environment.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2017-11-11 01:53:23 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2017-11-20 23:08:17 +0200
commit5d51bc79c7555e681a0c638da9528458257744ae (patch)
tree9d8e24be05870144a8763a094a8b273fd657c262 /mesonbuild/environment.py
parentb3dfb80c15cae24c66d07425bb7a327528438a55 (diff)
downloadmeson-5d51bc79c7555e681a0c638da9528458257744ae.zip
meson-5d51bc79c7555e681a0c638da9528458257744ae.tar.gz
meson-5d51bc79c7555e681a0c638da9528458257744ae.tar.bz2
Replaced sys.executable use with the mesonlib equivalent.
Diffstat (limited to 'mesonbuild/environment.py')
-rw-r--r--mesonbuild/environment.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
index d9146eb..9045007 100644
--- a/mesonbuild/environment.py
+++ b/mesonbuild/environment.py
@@ -325,14 +325,10 @@ class Environment:
return self.coredata
def get_build_command(self, unbuffered=False):
- # If running an executable created with cx_freeze,
- # Python might not be installed so don't prefix
- # the command with it.
- if sys.executable.endswith('meson.exe'):
- return [sys.executable]
- if unbuffered:
- [sys.executable, '-u', self.meson_script_launcher]
- return [sys.executable, self.meson_script_launcher]
+ cmd = mesonlib.meson_command[:]
+ if unbuffered and 'python' in cmd[0]:
+ cmd = [cmd[0],'-u'] + cmd[1:]
+ return cmd
def is_header(self, fname):
return is_header(fname)