aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2017-11-20 23:38:26 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2017-11-21 23:29:06 +0200
commit22adda16179e11dd7e5ca34a34e6286afcf6c0c9 (patch)
treecbcf0e9047aa4f245a1b4ba50321c42325ccc443
parent105ea1e597a6ec5e711d95ec6339597ef759c475 (diff)
downloadmeson-22adda16179e11dd7e5ca34a34e6286afcf6c0c9.zip
meson-22adda16179e11dd7e5ca34a34e6286afcf6c0c9.tar.gz
meson-22adda16179e11dd7e5ca34a34e6286afcf6c0c9.tar.bz2
Review fixes.
-rw-r--r--mesonbuild/backend/vs2010backend.py4
-rw-r--r--mesonbuild/backend/xcodebackend.py2
-rw-r--r--mesonbuild/environment.py2
-rw-r--r--mesonbuild/mesonlib.py4
-rw-r--r--mesonbuild/scripts/regen_checker.py11
-rwxr-xr-xmsi/createmsi.py1
6 files changed, 12 insertions, 12 deletions
diff --git a/mesonbuild/backend/vs2010backend.py b/mesonbuild/backend/vs2010backend.py
index efa4329..69ee3e5 100644
--- a/mesonbuild/backend/vs2010backend.py
+++ b/mesonbuild/backend/vs2010backend.py
@@ -23,7 +23,7 @@ from .. import dependencies
from .. import mlog
from .. import compilers
from ..compilers import CompilerArgs
-from ..mesonlib import MesonException, File
+from ..mesonlib import MesonException, File, python_command
from ..environment import Environment
def autodetect_vs_version(build):
@@ -396,7 +396,7 @@ class Vs2010Backend(backends.Backend):
action = ET.SubElement(root, 'ItemDefinitionGroup')
customstep = ET.SubElement(action, 'PostBuildEvent')
cmd_raw = [target.command] + target.args
- cmd = mesonlib.python_command +
+ cmd = python_command + \
[os.path.join(self.environment.get_script_dir(), 'commandrunner.py'),
self.environment.get_build_dir(),
self.environment.get_source_dir(),
diff --git a/mesonbuild/backend/xcodebackend.py b/mesonbuild/backend/xcodebackend.py
index ea9be30..aca3aea 100644
--- a/mesonbuild/backend/xcodebackend.py
+++ b/mesonbuild/backend/xcodebackend.py
@@ -567,7 +567,7 @@ class XCodeBackend(backends.Backend):
self.write_line('shellPath = /bin/sh;')
script_root = self.environment.get_script_dir()
test_script = os.path.join(script_root, 'meson_test.py')
- cmd = mesonlib.python_command[test_script, test_data, '--wd', self.environment.get_build_dir()]
+ cmd = mesonlib.python_command + [test_script, test_data, '--wd', self.environment.get_build_dir()]
cmdstr = ' '.join(["'%s'" % i for i in cmd])
self.write_line('shellScript = "%s";' % cmdstr)
self.write_line('showEnvVarsInLog = 0;')
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
index 9045007..58cc9b9 100644
--- a/mesonbuild/environment.py
+++ b/mesonbuild/environment.py
@@ -327,7 +327,7 @@ class Environment:
def get_build_command(self, unbuffered=False):
cmd = mesonlib.meson_command[:]
if unbuffered and 'python' in cmd[0]:
- cmd = [cmd[0],'-u'] + cmd[1:]
+ cmd.insert(1, '-u')
return cmd
def is_header(self, fname):
diff --git a/mesonbuild/mesonlib.py b/mesonbuild/mesonlib.py
index 35aa036..83bfdbe 100644
--- a/mesonbuild/mesonlib.py
+++ b/mesonbuild/mesonlib.py
@@ -22,12 +22,12 @@ import collections
from glob import glob
-if sys.executable.endswith('meson.exe'):
+if os.path.basename(sys.executable) == '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')]
+ meson_command = [sys.executable, os.path.join(os.path.dirname(__file__), '..', 'meson.py')]
python_command = [sys.executable]
diff --git a/mesonbuild/scripts/regen_checker.py b/mesonbuild/scripts/regen_checker.py
index e8fbd19..a9b00c7 100644
--- a/mesonbuild/scripts/regen_checker.py
+++ b/mesonbuild/scripts/regen_checker.py
@@ -14,6 +14,7 @@
import sys, os
import pickle, subprocess
+from mesonbuild.mesonlib import meson_command
# This could also be used for XCode.
@@ -32,11 +33,11 @@ def need_regen(regeninfo, regen_timestamp):
return False
def regen(regeninfo, mesonscript, backend):
- cmd = mesonlib.meson_command + ['--internal',
- 'regenerate',
- regeninfo.build_dir,
- regeninfo.source_dir,
- '--backend=' + backend]
+ cmd = meson_command + ['--internal',
+ 'regenerate',
+ regeninfo.build_dir,
+ regeninfo.source_dir,
+ '--backend=' + backend]
subprocess.check_call(cmd)
def run(args):
diff --git a/msi/createmsi.py b/msi/createmsi.py
index 4f1fd5b..3ea0958 100755
--- a/msi/createmsi.py
+++ b/msi/createmsi.py
@@ -17,7 +17,6 @@
import sys, os, subprocess, shutil, uuid
from glob import glob
import platform
-import shutil
import xml.etree.ElementTree as ET
sys.path.append(os.getcwd())