aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/environment.py
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2017-01-09 16:57:04 +0530
committerJussi Pakkanen <jpakkane@gmail.com>2017-01-09 14:03:03 -0500
commit747d4f2b03d471efd01a6929dc4bd2c789b1c610 (patch)
tree3cbdd7346d679cbe455ccd10e540cefa0e25582d /mesonbuild/environment.py
parent00f62d07558f74f57972f35eb9508d0a78019cc2 (diff)
downloadmeson-747d4f2b03d471efd01a6929dc4bd2c789b1c610.zip
meson-747d4f2b03d471efd01a6929dc4bd2c789b1c610.tar.gz
meson-747d4f2b03d471efd01a6929dc4bd2c789b1c610.tar.bz2
We only need Ninja 1.5.x for the core code
This change helps us run on older distros such as Ubuntu LTS which is very lazy in updating even non-core and stable packages such as Ninja. Ninja 1.6.x is only needed for running the tests.
Diffstat (limited to 'mesonbuild/environment.py')
-rw-r--r--mesonbuild/environment.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
index 48f5865..e4a55b3 100644
--- a/mesonbuild/environment.py
+++ b/mesonbuild/environment.py
@@ -36,16 +36,16 @@ def find_coverage_tools():
genhtml_exe = None
return (gcovr_exe, lcov_exe, genhtml_exe)
-def detect_ninja():
+def detect_ninja(version='1.5'):
for n in ['ninja', 'ninja-build']:
try:
- p, version = Popen_safe([n, '--version'])[0:2]
+ p, found = Popen_safe([n, '--version'])[0:2]
except (FileNotFoundError, PermissionError):
# Doesn't exist in PATH or isn't executable
continue
# Perhaps we should add a way for the caller to know the failure mode
# (not found or too old)
- if p.returncode == 0 and mesonlib.version_compare(version, ">=1.6"):
+ if p.returncode == 0 and mesonlib.version_compare(found, '>=' + version):
return n
def detect_native_windows_arch():