aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/interpreter/kwargs.py
diff options
context:
space:
mode:
authorDaniel Mensinger <daniel@mensinger-ka.de>2021-06-17 00:27:39 +0200
committerDaniel Mensinger <daniel@mensinger-ka.de>2021-06-18 23:48:33 +0200
commit7c757dff71c031ae02ecc358a69a213a5db4051a (patch)
tree5e7892f0eaa302749440f53b859ff281a2d2584e /mesonbuild/interpreter/kwargs.py
parent34c28dc92cb4f28e32e633297e4b8a737228aae5 (diff)
downloadmeson-7c757dff71c031ae02ecc358a69a213a5db4051a.zip
meson-7c757dff71c031ae02ecc358a69a213a5db4051a.tar.gz
meson-7c757dff71c031ae02ecc358a69a213a5db4051a.tar.bz2
holders: Fix the remaining code to respect the holder changes
Diffstat (limited to 'mesonbuild/interpreter/kwargs.py')
-rw-r--r--mesonbuild/interpreter/kwargs.py30
1 files changed, 21 insertions, 9 deletions
diff --git a/mesonbuild/interpreter/kwargs.py b/mesonbuild/interpreter/kwargs.py
index 9734caa..1cc2082 100644
--- a/mesonbuild/interpreter/kwargs.py
+++ b/mesonbuild/interpreter/kwargs.py
@@ -4,15 +4,14 @@
"""Keyword Argument type annotations."""
+from mesonbuild import coredata
import typing as T
from typing_extensions import TypedDict, Literal
+from .. import build
from ..mesonlib import MachineChoice, File
-from .interpreterobjects import (
- BuildTargetHolder, CustomTargetHolder, EnvironmentVariablesHolder,
- FeatureOptionHolder, TargetHolder
-)
+from .interpreterobjects import EnvironmentVariablesObject
class FuncAddProjectArgs(TypedDict):
@@ -34,13 +33,13 @@ class BaseTest(TypedDict):
"""Shared base for the Rust module."""
- args: T.List[T.Union[str, File, TargetHolder]]
+ args: T.List[T.Union[str, File, build.Target]]
should_fail: bool
timeout: int
workdir: T.Optional[str]
- depends: T.List[T.Union[CustomTargetHolder, BuildTargetHolder]]
+ depends: T.List[T.Union[build.CustomTarget, build.BuildTarget]]
priority: int
- env: T.Union[EnvironmentVariablesHolder, T.List[str], T.Dict[str, str], str]
+ env: T.Union[EnvironmentVariablesObject, T.List[str], T.Dict[str, str], str]
suite: T.List[str]
@@ -70,7 +69,7 @@ class ExtractRequired(TypedDict):
a boolean or a feature option should inherit it's arguments from this class.
"""
- required: T.Union[bool, 'FeatureOptionHolder']
+ required: T.Union[bool, coredata.UserFeatureOption]
class FuncGenerator(TypedDict):
@@ -81,7 +80,7 @@ class FuncGenerator(TypedDict):
output: T.List[str]
depfile: bool
capture: bool
- depends: T.List[T.Union['BuildTargetHolder', 'CustomTargetHolder']]
+ depends: T.List[T.Union[build.BuildTarget, build.CustomTarget]]
class GeneratorProcess(TypedDict):
@@ -90,3 +89,16 @@ class GeneratorProcess(TypedDict):
preserve_path_from: T.Optional[str]
extra_args: T.List[str]
+
+class DependencyMethodPartialDependency(TypedDict):
+
+ """ Keyword Arguments for the dep.partial_dependency methods """
+
+ compile_args: bool
+ link_args: bool
+ links: bool
+ includes: bool
+ sources: bool
+
+class BuildTargeMethodExtractAllObjects(TypedDict):
+ recursive: bool