From 21c8582d150942f299bbd66ae8f93e7479cae909 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Thu, 14 May 2020 11:18:17 -0700 Subject: [PATCH] interpreterbase: Proxy extra_message through to feature_check_class --- mesonbuild/interpreterbase.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mesonbuild/interpreterbase.py b/mesonbuild/interpreterbase.py index 6c2e73f43..bb88e2c08 100644 --- a/mesonbuild/interpreterbase.py +++ b/mesonbuild/interpreterbase.py @@ -356,10 +356,12 @@ class FeatureCheckKwargsBase(metaclass=abc.ABCMeta): def feature_check_class(self) -> T.Type[FeatureCheckBase]: pass - def __init__(self, feature_name: str, feature_version: str, kwargs: T.List[str]): + def __init__(self, feature_name: str, feature_version: str, + kwargs: T.List[str], extra_message: T.Optional[str] = None): self.feature_name = feature_name self.feature_version = feature_version self.kwargs = kwargs + self.extra_message = extra_message def __call__(self, f): @wraps(f) @@ -371,7 +373,8 @@ class FeatureCheckKwargsBase(metaclass=abc.ABCMeta): if arg not in kwargs: continue name = arg + ' arg in ' + self.feature_name - self.feature_check_class.single_use(name, self.feature_version, subproject) + self.feature_check_class.single_use( + name, self.feature_version, subproject, self.extra_message) return f(*wrapped_args, **wrapped_kwargs) return wrapped