diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2016-11-29 00:57:01 +0530 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2016-12-03 21:46:20 +0200 |
commit | e1c9d94708fe4b13986fa61aa3fa308f3b6e8a70 (patch) | |
tree | 6f6e57749addb4f687c6aba3f39a68f35a5c6e34 /mesonbuild/interpreter.py | |
parent | 2f804e9074f391e8efbf4a2deb9f1cc3ebaaaf2e (diff) | |
download | meson-e1c9d94708fe4b13986fa61aa3fa308f3b6e8a70.zip meson-e1c9d94708fe4b13986fa61aa3fa308f3b6e8a70.tar.gz meson-e1c9d94708fe4b13986fa61aa3fa308f3b6e8a70.tar.bz2 |
Allow many version conditions for pkg-config deps
Sometimes we want to restrict the acceptable versions to a list of
versions, or a smallest-version + largest-version, or both. For
instance, GStreamer's opencv plugin is only compatible with
3.1.0 >= opencv >= 2.3.0
Diffstat (limited to 'mesonbuild/interpreter.py')
-rw-r--r-- | mesonbuild/interpreter.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py index ef99511..e9273e4 100644 --- a/mesonbuild/interpreter.py +++ b/mesonbuild/interpreter.py @@ -1862,7 +1862,8 @@ requirements use the version keyword argument instead.''') if 'version' in kwargs: wanted = kwargs['version'] found = cached_dep.get_version() - if not cached_dep.found() or not mesonlib.version_compare(found, wanted): + if not cached_dep.found() or \ + not mesonlib.version_compare_many(found, wanted)[0]: # Cached dep has the wrong version. Check if an external # dependency or a fallback dependency provides it. cached_dep = None |