pkgconfig dependency: Define version_reqs at the start

Otherwise a cached not-found dependency won't have it and __repr__
will fail.
pull/1751/head
Nirbheek Chauhan 8 years ago
parent ac1c929f66
commit 41f51f567a
  1. 2
      mesonbuild/dependencies.py

@ -127,6 +127,7 @@ class PkgConfigDependency(Dependency):
def __init__(self, name, environment, kwargs): def __init__(self, name, environment, kwargs):
Dependency.__init__(self, 'pkgconfig', kwargs) Dependency.__init__(self, 'pkgconfig', kwargs)
self.is_libtool = False self.is_libtool = False
self.version_reqs = kwargs.get('version', None)
self.required = kwargs.get('required', True) self.required = kwargs.get('required', True)
self.static = kwargs.get('static', False) self.static = kwargs.get('static', False)
self.silent = kwargs.get('silent', False) self.silent = kwargs.get('silent', False)
@ -187,7 +188,6 @@ class PkgConfigDependency(Dependency):
''.format(self.type_string, name)) ''.format(self.type_string, name))
return return
found_msg = [self.type_string + ' dependency', mlog.bold(name), 'found:'] found_msg = [self.type_string + ' dependency', mlog.bold(name), 'found:']
self.version_reqs = kwargs.get('version', None)
if self.version_reqs is None: if self.version_reqs is None:
self.is_found = True self.is_found = True
else: else:

Loading…
Cancel
Save