deps: Do not deepcopy internal libraries (fixes #7457)

pull/7460/head
Daniel Mensinger 4 years ago
parent 2353d67c25
commit 9e0f78476d
No known key found for this signature in database
GPG Key ID: 54DD94C131E277D4
  1. 10
      mesonbuild/dependencies/base.py

@ -252,6 +252,16 @@ class InternalDependency(Dependency):
self.ext_deps = ext_deps
self.variables = variables
def __deepcopy__(self, memo: dict) -> 'InternalDependency':
result = self.__class__.__new__(self.__class__)
memo[id(self)] = result
for k, v in self.__dict__.items():
if k in ['libraries', 'whole_libraries']:
setattr(result, k, copy.copy(v))
else:
setattr(result, k, copy.deepcopy(v, memo))
return result
def get_pkgconfig_variable(self, variable_name, kwargs):
raise DependencyException('Method "get_pkgconfig_variable()" is '
'invalid for an internal dependency')

Loading…
Cancel
Save