Skip to content

Commit

Permalink
dependencies: version_compare -> version_compare_many
Browse files Browse the repository at this point in the history
It's possible to get an array of versions here, so we need to handle
that.
  • Loading branch information
dcbaker committed Dec 20, 2024
1 parent 036caec commit a7de9ad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mesonbuild/dependencies/dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ def __init__(self, environment: 'Environment', kwargs: JNISystemDependencyKW):
self.is_found = False
return

if 'version' in kwargs and not version_compare(self.version, kwargs['version']):
if 'version' in kwargs and not version_compare_many(self.version, kwargs['version']):
mlog.error(f'Incorrect JDK version found ({self.version}), wanted {kwargs["version"]}')
self.is_found = False
return
Expand Down
2 changes: 1 addition & 1 deletion mesonbuild/dependencies/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ def __init__(self, name: str, env: 'Environment', kwargs: T.Dict[str, T.Any]):
req = kwargs.get('version')
if req:
if self.version:
self.is_found = mesonlib.version_compare(self.version, req)
self.is_found, *_ = mesonlib.version_compare_many(self.version, req)
else:
mlog.warning('Cannot determine version of curses to compare against.')

Expand Down

0 comments on commit a7de9ad

Please sign in to comment.