From a3444d31dbf38ea6165096b897f6b94c92aa8b5b Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Fri, 29 Sep 2023 13:19:11 -0700 Subject: [PATCH] interpreter: use typed_kwargs for build_target.implicit_include_directories --- mesonbuild/interpreter/interpreter.py | 2 +- mesonbuild/interpreter/kwargs.py | 1 + mesonbuild/interpreter/type_checking.py | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/mesonbuild/interpreter/interpreter.py b/mesonbuild/interpreter/interpreter.py index d28b292b5..0ceb00fe7 100644 --- a/mesonbuild/interpreter/interpreter.py +++ b/mesonbuild/interpreter/interpreter.py @@ -3292,7 +3292,7 @@ class Interpreter(InterpreterBase, HoldableObject): kwargs: T.Union[kwtypes.Executable, kwtypes.StaticLibrary, kwtypes.SharedLibrary, kwtypes.SharedModule, kwtypes.Jar], targetclass: T.Type[T.Union[build.Executable, build.StaticLibrary, build.SharedModule, build.SharedLibrary, build.Jar]] ) -> T.Union[build.Executable, build.StaticLibrary, build.SharedModule, build.SharedLibrary, build.Jar]: - @FeatureNewKwargs('build target', '0.42.0', ['build_rpath', 'implicit_include_directories']) + @FeatureNewKwargs('build target', '0.42.0', ['build_rpath']) @FeatureNewKwargs('build target', '0.48.0', ['gnu_symbol_visibility']) def build_target_decorator_caller(self, node, args, kwargs): return True diff --git a/mesonbuild/interpreter/kwargs.py b/mesonbuild/interpreter/kwargs.py index 5fc2e3e8c..6ab0d1836 100644 --- a/mesonbuild/interpreter/kwargs.py +++ b/mesonbuild/interpreter/kwargs.py @@ -329,6 +329,7 @@ class _BaseBuildTarget(TypedDict): extra_files: T.List[FileOrString] install: bool install_mode: FileMode + implicit_include_directories: bool native: MachineChoice override_options: T.Dict[OptionKey, T.Union[str, int, bool, T.List[str]]] depend_files: NotRequired[T.List[File]] diff --git a/mesonbuild/interpreter/type_checking.py b/mesonbuild/interpreter/type_checking.py index 9ade652c0..e22bd401f 100644 --- a/mesonbuild/interpreter/type_checking.py +++ b/mesonbuild/interpreter/type_checking.py @@ -556,6 +556,7 @@ _ALL_TARGET_KWS: T.List[KwargInfo] = [ KwargInfo('extra_files', ContainerTypeInfo(list, (str, File)), default=[], listify=True), INSTALL_KW, INSTALL_MODE_KW, + KwargInfo('implicit_include_directories', bool, default=True, since='0.42.0'), NATIVE_KW, ]