From b0c69696191cdc849acde3b7045808cb931a54b6 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Wed, 8 Aug 2018 00:12:06 +0530 Subject: Don't check version for fallback not-found dependency Otherwise we get an error while checking the subproject version: Uncomparable version string 'none'. If the dependency was found as a not-found dependency in the subproject and is not required, just take it. --- mesonbuild/interpreter.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py index 121b8f0..3aa3b23 100644 --- a/mesonbuild/interpreter.py +++ b/mesonbuild/interpreter.py @@ -2805,6 +2805,12 @@ external dependencies (including libraries) must go to "dependencies".''') if not dep: return False found = dep.version_method([], {}) + # Don't do a version check if the dependency is not found and not required + if found == 'none' and not required: + subproj_path = os.path.join(self.subproject_dir, dirname) + mlog.log('Dependency', mlog.bold(name), 'from subproject', + mlog.bold(subproj_path), 'found:', mlog.red('NO'), '(cached)') + return dep if self.check_subproject_version(wanted, found): subproj_path = os.path.join(self.subproject_dir, dirname) mlog.log('Dependency', mlog.bold(name), 'from subproject', -- cgit v1.1