diff options
author | Xavier Claessens <xavier.claessens@collabora.com> | 2021-03-03 09:02:49 -0500 |
---|---|---|
committer | Xavier Claessens <xclaesse@gmail.com> | 2021-05-28 15:17:10 -0400 |
commit | 723c5227a471aff3a1a5a3bc481984c99bf592aa (patch) | |
tree | 647154c14f8a8de4f58da4b1bd272a5dfaf30efa /mesonbuild/modules/dlang.py | |
parent | 495e76d10a65df9e19e96e5470d64644da0e8099 (diff) | |
download | meson-723c5227a471aff3a1a5a3bc481984c99bf592aa.zip meson-723c5227a471aff3a1a5a3bc481984c99bf592aa.tar.gz meson-723c5227a471aff3a1a5a3bc481984c99bf592aa.tar.bz2 |
modules: Remove snippet methods
The only advantage they have is they have the interpreter in arguments,
but it's already available as self.interpreter. We should discourage
usage of the interpreter API and rely on ModuleState object instead in
the future.
This also lift the restriction that a module method cannot add build
targets, but that was not enforced for snippet methods anyway (and some
modules were doing it) and it's really loose restriction as it should
check for many other things if we wanted to make it consistent.
Diffstat (limited to 'mesonbuild/modules/dlang.py')
-rw-r--r-- | mesonbuild/modules/dlang.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/mesonbuild/modules/dlang.py b/mesonbuild/modules/dlang.py index f2633cb..1dcf5e2 100644 --- a/mesonbuild/modules/dlang.py +++ b/mesonbuild/modules/dlang.py @@ -36,7 +36,6 @@ class DlangModule(ExtensionModule): def __init__(self, interpreter): super().__init__(interpreter) - self.snippets.add('generate_dub_file') def _init_dub(self): if DlangModule.class_dubbin is None: @@ -55,7 +54,7 @@ class DlangModule(ExtensionModule): if not self.dubbin: raise MesonException('DUB not found.') - def generate_dub_file(self, interpreter, state, args, kwargs): + def generate_dub_file(self, state, args, kwargs): if not DlangModule.init_dub: self._init_dub() |