diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2017-01-08 22:47:57 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2017-01-09 21:11:48 +0200 |
commit | fbabe8ad85725762e46b7c4c2f2c680c3351ec80 (patch) | |
tree | d8293e07d3e66096e9789e41cb04364588f2d841 /mesonbuild/modules/__init__.py | |
parent | 24221d71ccd341759b008cf1918826910c40247c (diff) | |
download | meson-fbabe8ad85725762e46b7c4c2f2c680c3351ec80.zip meson-fbabe8ad85725762e46b7c4c2f2c680c3351ec80.tar.gz meson-fbabe8ad85725762e46b7c4c2f2c680c3351ec80.tar.bz2 |
There are two different kinds of extensions: modules that create new
objects directly and snippets that just call into interpreter methods.
Diffstat (limited to 'mesonbuild/modules/__init__.py')
-rw-r--r-- | mesonbuild/modules/__init__.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mesonbuild/modules/__init__.py b/mesonbuild/modules/__init__.py index 16cada0..c7f24d4 100644 --- a/mesonbuild/modules/__init__.py +++ b/mesonbuild/modules/__init__.py @@ -6,6 +6,13 @@ from ..mesonlib import MesonException _found_programs = {} +class ExtensionModule: + def __init__(self): + self.snippets = set() # List of methods that operate only on the interpreter. + + def is_snippet(self, funcname): + return funcname in self.snippets + def find_program(program_name, target_name): if program_name in _found_programs: return _found_programs[program_name] |