From cef13b04c253150a449eaea806d97207281916eb Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Sun, 22 Nov 2020 03:55:51 +0200 Subject: [PATCH] Bump Ninja requirement to 1.8. --- README.md | 4 ++-- mesonbuild/backend/ninjabackend.py | 4 ++-- mesonbuild/environment.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 9df015c11..53b3e842c 100644 --- a/README.md +++ b/README.md @@ -15,8 +15,8 @@ build system. #### Dependencies - - [Python](https://python.org) (version 3.5 or newer) - - [Ninja](https://ninja-build.org) (version 1.7 or newer) + - [Python](https://python.org) (version 3.6 or newer) + - [Ninja](https://ninja-build.org) (version 1.8.2 or newer) #### Installing from source diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index f79e1f0bf..b03954a6a 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -492,7 +492,7 @@ int dummy; def generate(self): ninja = environment.detect_ninja_command_and_version(log=True) if ninja is None: - raise MesonException('Could not detect Ninja v1.7 or newer') + raise MesonException('Could not detect Ninja v1.8.2 or newer') (self.ninja_command, self.ninja_version) = ninja outfilename = os.path.join(self.environment.get_build_dir(), self.ninja_filename) tempfilename = outfilename + '~' @@ -500,7 +500,7 @@ int dummy; outfile.write('# This is the build file for project "{}"\n'.format(self.build.get_project())) outfile.write('# It is autogenerated by the Meson build system.\n') outfile.write('# Do not edit by hand.\n\n') - outfile.write('ninja_required_version = 1.7.1\n\n') + outfile.write('ninja_required_version = 1.8.2\n\n') num_pools = self.environment.coredata.backend_options['backend_max_links'].value if num_pools > 0: diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index 7194d0345..faac0edec 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py @@ -175,11 +175,11 @@ def find_coverage_tools() -> T.Tuple[T.Optional[str], T.Optional[str], T.Optiona return gcovr_exe, gcovr_new_rootdir, lcov_exe, genhtml_exe, llvm_cov_exe -def detect_ninja(version: str = '1.7', log: bool = False) -> T.List[str]: +def detect_ninja(version: str = '1.8.2', log: bool = False) -> T.List[str]: r = detect_ninja_command_and_version(version, log) return r[0] if r else None -def detect_ninja_command_and_version(version: str = '1.7', log: bool = False) -> (T.List[str], str): +def detect_ninja_command_and_version(version: str = '1.8.2', log: bool = False) -> (T.List[str], str): from .dependencies.base import ExternalProgram env_ninja = os.environ.get('NINJA', None) for n in [env_ninja] if env_ninja else ['ninja', 'ninja-build', 'samu']: