diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2019-07-26 16:04:41 +0400 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2019-08-04 21:44:52 +0300 |
commit | 940ebd658b9e7bf1679bd8fbfbcb6b429d80424a (patch) | |
tree | f784e5dceb1c7404800aa64209e0434fd13be8fd /mesonbuild/modules/sourceset.py | |
parent | 44ac680e556ee32aff5bd007a9643b8281e4c548 (diff) | |
download | meson-940ebd658b9e7bf1679bd8fbfbcb6b429d80424a.zip meson-940ebd658b9e7bf1679bd8fbfbcb6b429d80424a.tar.gz meson-940ebd658b9e7bf1679bd8fbfbcb6b429d80424a.tar.bz2 |
sourceset: fix using FeatureCheck decorators
The feature check facilities need to have access to subproject.
Diffstat (limited to 'mesonbuild/modules/sourceset.py')
-rw-r--r-- | mesonbuild/modules/sourceset.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/mesonbuild/modules/sourceset.py b/mesonbuild/modules/sourceset.py index ca913f6..fc46a7a 100644 --- a/mesonbuild/modules/sourceset.py +++ b/mesonbuild/modules/sourceset.py @@ -30,11 +30,12 @@ SourceSetRule = namedtuple('SourceSetRule', 'keys sources if_false sourcesets de SourceFiles = namedtuple('SourceFiles', 'sources dependencies') class SourceSetHolder(MutableInterpreterObject, ObjectHolder): - def __init__(self, environment, subdir): + def __init__(self, interpreter): MutableInterpreterObject.__init__(self) ObjectHolder.__init__(self, list()) - self.environment = environment - self.subdir = subdir + self.subproject = interpreter.subproject + self.environment = interpreter.environment + self.subdir = interpreter.subdir self.frozen = False self.methods.update({ 'add': self.add_method, @@ -184,7 +185,7 @@ class SourceSetModule(ExtensionModule): @noKwargs @noPosargs def source_set(self, interpreter, state, args, kwargs): - return SourceSetHolder(interpreter.environment, interpreter.subdir) + return SourceSetHolder(interpreter) def initialize(*args, **kwargs): return SourceSetModule(*args, **kwargs) |