aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Mensinger <daniel@mensinger-ka.de>2020-07-16 14:29:00 +0200
committerDaniel Mensinger <daniel@mensinger-ka.de>2020-07-16 14:29:00 +0200
commit9e0f78476dc2839c702f02fab8f89e2abdb7c44f (patch)
tree3a032775e14462a4ed072670cd55edb86b18735c
parent2353d67c25629da049b192d7fddb3e7851edb8df (diff)
downloadmeson-9e0f78476dc2839c702f02fab8f89e2abdb7c44f.zip
meson-9e0f78476dc2839c702f02fab8f89e2abdb7c44f.tar.gz
meson-9e0f78476dc2839c702f02fab8f89e2abdb7c44f.tar.bz2
deps: Do not deepcopy internal libraries (fixes #7457)
-rw-r--r--mesonbuild/dependencies/base.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py
index 23701da..1bb71f7 100644
--- a/mesonbuild/dependencies/base.py
+++ b/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')