diff options
| author | Dylan Baker <dylan@pnwbakers.com> | 2020-12-02 09:57:47 -0800 |
|---|---|---|
| committer | Dylan Baker <dylan@pnwbakers.com> | 2021-01-04 12:15:41 -0800 |
| commit | 615686fd6dc39c517952c0f9f5fb208e913d8887 (patch) | |
| tree | 48c0493be8b38519e10c04ace0358d5f16c6f6e5 | |
| parent | 30ec7612c87676e541c924995feb476bf4254eab (diff) | |
| download | meson-615686fd6dc39c517952c0f9f5fb208e913d8887.tar.gz | |
use new optionkey.is_* methods
| -rw-r--r-- | mesonbuild/ast/introspection.py | 2 | ||||
| -rw-r--r-- | mesonbuild/coredata.py | 2 | ||||
| -rw-r--r-- | mesonbuild/interpreter.py | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/ast/introspection.py b/mesonbuild/ast/introspection.py index 086174805..030ca8b18 100644 --- a/mesonbuild/ast/introspection.py +++ b/mesonbuild/ast/introspection.py @@ -125,7 +125,7 @@ class IntrospectionInterpreter(AstInterpreter): self.do_subproject(i) self.coredata.init_backend_options(self.backend) - options = {k: v for k, v in self.environment.options.items() if k.name.startswith('backend_')} + options = {k: v for k, v in self.environment.options.items() if k.is_backend()} self.coredata.set_options(options) self._add_languages(proj_langs, MachineChoice.HOST) diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py index 263d2fec5..eae986dae 100644 --- a/mesonbuild/coredata.py +++ b/mesonbuild/coredata.py @@ -89,7 +89,7 @@ class OptionKey: internally easier to reason about and produce. """ - __slots__ = ['name', 'subproject', 'machine', 'lang', '_hash', '_type'] + __slots__ = ['name', 'subproject', 'machine', 'lang', '_hash', 'type'] name: str subproject: str diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py index a266e1f70..e6936e4ec 100644 --- a/mesonbuild/interpreter.py +++ b/mesonbuild/interpreter.py @@ -3142,7 +3142,7 @@ external dependencies (including libraries) must go to "dependencies".''') if self.environment.first_invocation: self.coredata.init_backend_options(backend) - options = {k: v for k, v in self.environment.options.items() if k.name.startswith('backend_')} + options = {k: v for k, v in self.environment.options.items() if k.is_backend()} self.coredata.set_options(options) @stringArgs |
