diff options
Diffstat (limited to 'mesonbuild/interpreter/kwargs.py')
-rw-r--r-- | mesonbuild/interpreter/kwargs.py | 48 |
1 files changed, 47 insertions, 1 deletions
diff --git a/mesonbuild/interpreter/kwargs.py b/mesonbuild/interpreter/kwargs.py index 2229984..4f8cf06 100644 --- a/mesonbuild/interpreter/kwargs.py +++ b/mesonbuild/interpreter/kwargs.py @@ -6,7 +6,7 @@ import typing as T -from typing_extensions import TypedDict, Literal +from typing_extensions import TypedDict, Literal, Protocol from .. import build from .. import coredata @@ -186,3 +186,49 @@ class CustomTarget(TypedDict): install_tag: T.List[T.Union[str, bool]] output: T.List[str] override_options: T.Dict[OptionKey, str] + +class AddTestSetup(TypedDict): + + exe_wrapper: T.List[T.Union[str, ExternalProgram]] + gdb: bool + timeout_multiplier: int + is_default: bool + exclude_suites: T.List[str] + env: build.EnvironmentVariables + + +class Project(TypedDict): + + version: T.Optional[FileOrString] + meson_version: T.Optional[str] + default_options: T.List[str] + license: T.List[str] + subproject_dir: str + + +class _FoundProto(Protocol): + + """Protocol for subdir arguments. + + This allows us to define any objec that has a found(self) -> bool method + """ + + def found(self) -> bool: ... + + +class Subdir(TypedDict): + + if_found: T.List[_FoundProto] + + +class Summary(TypedDict): + + section: str + bool_yn: bool + list_sep: T.Optional[str] + + +class FindProgram(ExtractRequired, ExtractSearchDirs): + + native: MachineChoice + version: T.List[str] |