aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2020-01-08 16:18:51 -0800
committerDylan Baker <dylan@pnwbakers.com>2020-01-29 09:11:24 -0800
commita8817a8e68c2d592b36b9cd42e20a27511051f7e (patch)
tree5664bc5a5a093f77e9815c3e735a03226a4210ae
parent89c67383ccd43eefc9b8c052ec2800a7860bd754 (diff)
downloadmeson-a8817a8e68c2d592b36b9cd42e20a27511051f7e.zip
meson-a8817a8e68c2d592b36b9cd42e20a27511051f7e.tar.gz
meson-a8817a8e68c2d592b36b9cd42e20a27511051f7e.tar.bz2
dependencies: Remove now dead code
Mostly this is the metagprogramming that ConfigToolDependency used to do, but doesn't need anymore.
-rw-r--r--mesonbuild/dependencies/base.py24
1 files changed, 0 insertions, 24 deletions
diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py
index 370c714..b6c6f19 100644
--- a/mesonbuild/dependencies/base.py
+++ b/mesonbuild/dependencies/base.py
@@ -427,30 +427,6 @@ class ConfigToolDependency(ExternalDependency):
return m.group(0).rstrip('.')
return version
- @classmethod
- def factory(cls, name, environment, language, kwargs, tools, tool_name, finish_init=None):
- """Constructor for use in dependencies that can be found multiple ways.
-
- In addition to the standard constructor values, this constructor sets
- the tool_name and tools values of the instance.
- """
- # This deserves some explanation, because metaprogramming is hard.
- # This uses type() to create a dynamic subclass of ConfigToolDependency
- # with the tools and tool_name class attributes set, this class is then
- # instantiated and returned. The reduce function (method) is also
- # attached, since python's pickle module won't be able to do anything
- # with this dynamically generated class otherwise.
- def reduce(self):
- return (cls._unpickle, (), self.__dict__)
- sub = type('{}Dependency'.format(name.capitalize()), (cls, ),
- {'tools': tools, 'tool_name': tool_name, '__reduce__': reduce, 'finish_init': staticmethod(finish_init)})
-
- return sub(name, environment, kwargs, language=language)
-
- @classmethod
- def _unpickle(cls):
- return cls.__new__(cls)
-
def find_config(self, versions=None):
"""Helper method that searches for config tool binaries in PATH and
returns the one that best matches the given version requirements.