diff options
| author | Xavier Claessens <xclaessens@netflix.com> | 2025-10-11 16:36:50 -0400 |
|---|---|---|
| committer | Xavier Claessens <xclaesse@gmail.com> | 2025-10-15 12:15:39 -0400 |
| commit | 1e61f9e9434b26a2fb4b3abe73f5209cd7eef2e3 (patch) | |
| tree | 87dcdb12ea3979dbea49bc5a9cc91019ae49eabf /mesonbuild/interpreter | |
| parent | 1826cba8d8f1316b83bb5864b9a61d756fe7f0ea (diff) | |
| download | meson-1e61f9e9434b26a2fb4b3abe73f5209cd7eef2e3.tar.gz | |
Add support for LocalProgram to custom_target() and run_target()
Diffstat (limited to 'mesonbuild/interpreter')
| -rw-r--r-- | mesonbuild/interpreter/kwargs.py | 5 | ||||
| -rw-r--r-- | mesonbuild/interpreter/type_checking.py | 7 |
2 files changed, 7 insertions, 5 deletions
diff --git a/mesonbuild/interpreter/kwargs.py b/mesonbuild/interpreter/kwargs.py index 1d58aa61f..b7b22827d 100644 --- a/mesonbuild/interpreter/kwargs.py +++ b/mesonbuild/interpreter/kwargs.py @@ -171,7 +171,8 @@ class FuncAddLanguages(ExtractRequired): class RunTarget(TypedDict): - command: T.List[T.Union[str, build.BuildTarget, build.CustomTarget, ExternalProgram, File]] + command: T.List[T.Union[str, build.BuildTarget, build.CustomTarget, ExternalProgram, + File, LocalProgram]] depends: T.List[T.Union[build.BuildTarget, build.CustomTarget]] env: EnvironmentVariables @@ -182,7 +183,7 @@ class CustomTarget(TypedDict): build_always_stale: T.Optional[bool] build_by_default: T.Optional[bool] capture: bool - command: T.List[T.Union[str, build.BuildTargetTypes, ExternalProgram, File]] + command: T.List[T.Union[str, build.BuildTargetTypes, ExternalProgram, File, LocalProgram]] console: bool depend_files: T.List[FileOrString] depends: T.List[T.Union[build.BuildTarget, build.CustomTarget]] diff --git a/mesonbuild/interpreter/type_checking.py b/mesonbuild/interpreter/type_checking.py index 567cd1e59..50f07699b 100644 --- a/mesonbuild/interpreter/type_checking.py +++ b/mesonbuild/interpreter/type_checking.py @@ -10,7 +10,8 @@ import typing as T from .. import compilers from ..build import (CustomTarget, BuildTarget, CustomTargetIndex, ExtractedObjects, GeneratedList, IncludeDirs, - BothLibraries, SharedLibrary, StaticLibrary, Jar, Executable, StructuredSources) + BothLibraries, SharedLibrary, StaticLibrary, Jar, Executable, StructuredSources, + LocalProgram) from ..options import OptionKey, UserFeatureOption from ..dependencies import Dependency, InternalDependency from ..interpreterbase.decorators import KwargInfo, ContainerTypeInfo @@ -284,9 +285,9 @@ DEPEND_FILES_KW: KwargInfo[T.List[T.Union[str, File]]] = KwargInfo( default=[], ) -COMMAND_KW: KwargInfo[T.List[T.Union[str, BuildTargetTypes, ExternalProgram, File]]] = KwargInfo( +COMMAND_KW: KwargInfo[T.List[T.Union[str, BuildTargetTypes, ExternalProgram, File, LocalProgram]]] = KwargInfo( 'command', - ContainerTypeInfo(list, (str, BuildTarget, CustomTarget, CustomTargetIndex, ExternalProgram, File), allow_empty=False), + ContainerTypeInfo(list, (str, BuildTarget, CustomTarget, CustomTargetIndex, ExternalProgram, File, LocalProgram), allow_empty=False), required=True, listify=True, default=[], |
