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/ui.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/ui.py')
-rw-r--r-- | mesonbuild/dependencies/ui.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/mesonbuild/dependencies/ui.py b/mesonbuild/dependencies/ui.py index c066c31..00cd56d 100644 --- a/mesonbuild/dependencies/ui.py +++ b/mesonbuild/dependencies/ui.py @@ -67,7 +67,8 @@ class GLDependency(ExternalDependency): self.version = '1' return - def get_methods(self): + @staticmethod + def get_methods(): if mesonlib.is_osx() or mesonlib.is_windows(): return [DependencyMethods.PKGCONFIG, DependencyMethods.SYSTEM] else: @@ -337,7 +338,8 @@ class QtBaseDependency(ExternalDependency): else: return qvars['QT_INSTALL_BINS'] - def get_methods(self): + @staticmethod + def get_methods(): return [DependencyMethods.PKGCONFIG, DependencyMethods.QMAKE] def get_exe_args(self, compiler): @@ -420,7 +422,8 @@ class SDL2Dependency(ExternalDependency): return mlog.log('Dependency', mlog.bold('sdl2'), 'found:', mlog.red('NO')) - def get_methods(self): + @staticmethod + def get_methods(): if mesonlib.is_osx(): return [DependencyMethods.PKGCONFIG, DependencyMethods.CONFIG_TOOL, DependencyMethods.EXTRAFRAMEWORK] else: @@ -526,5 +529,6 @@ class VulkanDependency(ExternalDependency): self.link_args.append(lib) return - def get_methods(self): + @staticmethod + def get_methods(): return [DependencyMethods.PKGCONFIG, DependencyMethods.SYSTEM] |