interpreter: move 'env' to type_checking

pull/9185/head
Dylan Baker 3 years ago
parent 8c90140f2b
commit ec59cbdf61
  1. 3
      mesonbuild/interpreter/interpreter.py
  2. 6
      mesonbuild/interpreter/type_checking.py

@ -51,6 +51,7 @@ from .interpreterobjects import (
NullSubprojectInterpreter,
)
from .type_checking import (
ENV_KW,
INSTALL_MODE_KW,
LANGUAGE_KW,
NATIVE_KW,
@ -189,7 +190,7 @@ TEST_KWARGS: T.List[KwargInfo] = [
listify=True, default=[], since='0.46.0'),
KwargInfo('priority', int, default=0, since='0.52.0'),
# TODO: env needs reworks of the way the environment variable holder itself works probably
KwargInfo('env', (EnvironmentVariablesObject, list, dict, str, NoneType)),
ENV_KW,
KwargInfo('suite', ContainerTypeInfo(list, str), listify=True, default=['']), # yes, a list of empty string
]

@ -6,6 +6,7 @@
import typing as T
from .. import compilers
from ..build import EnvironmentVariables
from ..coredata import UserFeatureOption
from ..interpreterbase.decorators import KwargInfo, ContainerTypeInfo
from ..mesonlib import FileMode, MachineChoice
@ -126,3 +127,8 @@ REQUIRED_KW: KwargInfo[T.Union[bool, UserFeatureOption]] = KwargInfo(
default=True,
# TODO: extract_required_kwarg could be converted to a convertor
)
ENV_KW: KwargInfo[T.Union[EnvironmentVariables, T.List, T.Dict, str, NoneType]] = KwargInfo(
'env',
(EnvironmentVariables, list, dict, str),
)

Loading…
Cancel
Save