From fbabe8ad85725762e46b7c4c2f2c680c3351ec80 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Sun, 8 Jan 2017 22:47:57 +0200 Subject: There are two different kinds of extensions: modules that create new objects directly and snippets that just call into interpreter methods. --- mesonbuild/modules/__init__.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'mesonbuild/modules/__init__.py') diff --git a/mesonbuild/modules/__init__.py b/mesonbuild/modules/__init__.py index 16cada08d..c7f24d4e1 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] -- cgit v1.2.3