diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2018-08-08 00:12:06 +0530 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2018-08-08 19:31:13 +0300 |
commit | a8694f4b261fbe3a854d2a2d72742fde9a67d4b3 (patch) | |
tree | 163ea06c6387916fcf45cca75b2e59c0d8f43dab /mesonbuild/interpreter.py | |
parent | ddb1238ee2dc22052563c479d26c03b569f8ea32 (diff) | |
download | meson-a8694f4b261fbe3a854d2a2d72742fde9a67d4b3.zip meson-a8694f4b261fbe3a854d2a2d72742fde9a67d4b3.tar.gz meson-a8694f4b261fbe3a854d2a2d72742fde9a67d4b3.tar.bz2 |
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.
Diffstat (limited to 'mesonbuild/interpreter.py')
-rw-r--r-- | mesonbuild/interpreter.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py index 3df3a45..fd0385d 100644 --- a/mesonbuild/interpreter.py +++ b/mesonbuild/interpreter.py @@ -2816,6 +2816,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', |