interpreterbase: Proxy extra_message through to feature_check_class

pull/7123/head
Dylan Baker 5 years ago
parent e3b2f1b82f
commit 21c8582d15
  1. 7
      mesonbuild/interpreterbase.py

@ -356,10 +356,12 @@ class FeatureCheckKwargsBase(metaclass=abc.ABCMeta):
def feature_check_class(self) -> T.Type[FeatureCheckBase]: def feature_check_class(self) -> T.Type[FeatureCheckBase]:
pass 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_name = feature_name
self.feature_version = feature_version self.feature_version = feature_version
self.kwargs = kwargs self.kwargs = kwargs
self.extra_message = extra_message
def __call__(self, f): def __call__(self, f):
@wraps(f) @wraps(f)
@ -371,7 +373,8 @@ class FeatureCheckKwargsBase(metaclass=abc.ABCMeta):
if arg not in kwargs: if arg not in kwargs:
continue continue
name = arg + ' arg in ' + self.feature_name 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 f(*wrapped_args, **wrapped_kwargs)
return wrapped return wrapped

Loading…
Cancel
Save