diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2018-01-14 14:04:45 +0000 |
---|---|---|
committer | Jon Turney <jon.turney@dronecode.org.uk> | 2018-01-15 13:12:29 +0000 |
commit | 8efdcca93063fb224c53ae2d6f57b8dacf082456 (patch) | |
tree | 6e96ce7aad071c9d047478140447d68e228452fb /mesonbuild/dependencies/base.py | |
parent | bd128bc30116a60be956454e871d9ea59cc1590a (diff) | |
download | meson-8efdcca93063fb224c53ae2d6f57b8dacf082456.zip meson-8efdcca93063fb224c53ae2d6f57b8dacf082456.tar.gz meson-8efdcca93063fb224c53ae2d6f57b8dacf082456.tar.bz2 |
Make Dependency.get_methods() a static method
Since this is only consulted while constructing the Dependency object, it's
result doesn't depend on the instance (and it would make no sense if it did)
Diffstat (limited to 'mesonbuild/dependencies/base.py')
-rw-r--r-- | mesonbuild/dependencies/base.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py index 01df9d0..fa50761 100644 --- a/mesonbuild/dependencies/base.py +++ b/mesonbuild/dependencies/base.py @@ -115,7 +115,8 @@ class Dependency: As an example, gtest-all.cc when using GTest.""" return self.sources - def get_methods(self): + @staticmethod + def get_methods(): return [DependencyMethods.AUTO] def get_name(self): @@ -308,7 +309,8 @@ class ConfigToolDependency(ExternalDependency): return [] return shlex.split(out) - def get_methods(self): + @staticmethod + def get_methods(): return [DependencyMethods.AUTO, DependencyMethods.CONFIG_TOOL] def get_configtool_variable(self, variable_name): @@ -535,7 +537,8 @@ class PkgConfigDependency(ExternalDependency): mlog.debug('Got pkgconfig variable %s : %s' % (variable_name, variable)) return variable - def get_methods(self): + @staticmethod + def get_methods(): return [DependencyMethods.PKGCONFIG] def check_pkgconfig(self): |