aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/interpreter/interpreter.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2022-03-09 12:35:39 -0800
committerEli Schwartz <eschwartz93@gmail.com>2022-08-18 21:57:36 -0400
commite84f293f672a372d2434d0ce4fa39d3f902b6ce8 (patch)
tree4df98f7d45469ef9fc12f92ef640f9de52bfece7 /mesonbuild/interpreter/interpreter.py
parentddb95b0ed8c09808388c94da4f4f47f9dc0633af (diff)
downloadmeson-e84f293f672a372d2434d0ce4fa39d3f902b6ce8.zip
meson-e84f293f672a372d2434d0ce4fa39d3f902b6ce8.tar.gz
meson-e84f293f672a372d2434d0ce4fa39d3f902b6ce8.tar.bz2
modules/pkgconfig: Use typed_kwargs
Diffstat (limited to 'mesonbuild/interpreter/interpreter.py')
-rw-r--r--mesonbuild/interpreter/interpreter.py25
1 files changed, 0 insertions, 25 deletions
diff --git a/mesonbuild/interpreter/interpreter.py b/mesonbuild/interpreter/interpreter.py
index b904055..9873888 100644
--- a/mesonbuild/interpreter/interpreter.py
+++ b/mesonbuild/interpreter/interpreter.py
@@ -85,8 +85,6 @@ from .type_checking import (
VARIABLES_KW,
NoneType,
in_set_validator,
- variables_validator,
- variables_convertor,
env_convertor_with_method
)
from . import primitives as P_OBJ
@@ -672,29 +670,6 @@ class Interpreter(InterpreterBase, HoldableObject):
def func_files(self, node: mparser.FunctionNode, args: T.Tuple[T.List[str]], kwargs: 'TYPE_kwargs') -> T.List[mesonlib.File]:
return self.source_strings_to_files(args[0])
- # Used by pkgconfig.generate()
- def extract_variables(self, kwargs: T.Dict[str, T.Union[T.Dict[str, str], T.List[str], str]],
- argname: str = 'variables', list_new: bool = False,
- dict_new: bool = False) -> T.Dict[str, str]:
- variables = kwargs.get(argname, {})
- if isinstance(variables, dict):
- if dict_new and variables:
- FeatureNew.single_use(f'{argname} as dictionary', '0.56.0', self.subproject, location=self.current_node)
- else:
- variables = mesonlib.stringlistify(variables)
- if list_new:
- FeatureNew.single_use(f'{argname} as list of strings', '0.56.0', self.subproject, location=self.current_node)
-
- invalid_msg = variables_validator(variables)
- if invalid_msg is not None:
- raise InterpreterException(invalid_msg)
-
- variables = variables_convertor(variables)
- for k, v in variables.items():
- if not isinstance(v, str):
- raise InterpreterException('variables values must be strings.')
-
- return variables
@noPosargs
@typed_kwargs(