diff options
author | Xavier Claessens <xavier.claessens@collabora.com> | 2023-08-15 21:03:07 -0400 |
---|---|---|
committer | Xavier Claessens <xclaesse@gmail.com> | 2023-09-18 13:51:27 -0400 |
commit | dec85c41a9e5d6f8bb2c4431a78a0a9ade3651fd (patch) | |
tree | a48a2884201f444833d74aec8f352924c77b644a /mesonbuild/interpreter | |
parent | 30d7f506c7ffe4af52feab1a68263a4bd8d78c8a (diff) | |
download | meson-dec85c41a9e5d6f8bb2c4431a78a0a9ade3651fd.zip meson-dec85c41a9e5d6f8bb2c4431a78a0a9ade3651fd.tar.gz meson-dec85c41a9e5d6f8bb2c4431a78a0a9ade3651fd.tar.bz2 |
Remove get_configtool_variable()
This also makes it more consistent with get_pkgconfig_variable() which
always return empty value instead of failing when the variable does not
exist. Linking that to self.required makes no sense and was never
documented any way.
Diffstat (limited to 'mesonbuild/interpreter')
-rw-r--r-- | mesonbuild/interpreter/interpreterobjects.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/mesonbuild/interpreter/interpreterobjects.py b/mesonbuild/interpreter/interpreterobjects.py index a76a0cb..46b4cc1 100644 --- a/mesonbuild/interpreter/interpreterobjects.py +++ b/mesonbuild/interpreter/interpreterobjects.py @@ -506,7 +506,13 @@ class DependencyHolder(ObjectHolder[Dependency]): @noKwargs @typed_pos_args('dependency.get_config_tool_variable', str) def configtool_method(self, args: T.Tuple[str], kwargs: TYPE_kwargs) -> str: - return self.held_object.get_configtool_variable(args[0]) + from ..dependencies.configtool import ConfigToolDependency + if not isinstance(self.held_object, ConfigToolDependency): + raise InvalidArguments(f'{self.held_object.get_name()!r} is not a config-tool dependency') + return self.held_object.get_variable( + configtool=args[0], + default_value='', + ) @FeatureNew('dependency.partial_dependency', '0.46.0') @noPosargs |