@noArgsFlattening
@permittedKwargs({'native'})
@FeatureNew('meson.get_external_property', '0.54.0')
def get_external_property_method(self, args: T.Sequence[str], kwargs: dict) -> str:
    if ((len(args) < 1) or (len(args) > 2)):
        raise InterpreterException('Must have one or two positional arguments.')
    propname = args[0]
    if (not isinstance(propname, str)):
        raise InterpreterException('Property name must be string.')

    def _get_native() -> str:
        try:
            props = self.interpreter.environment.properties.build
            return props[propname]
        except Exception:
            if (len(args) == 2):
                return args[1]
            raise InterpreterException(('Unknown native property: %s.' % propname))
    if ('native' in kwargs):
        if kwargs['native']:
            return _get_native()
        else:
            return self.get_cross_property_method(args, {})
    elif self.build.environment.is_cross_build():
        return self.get_cross_property_method(args, kwargs)
    else:
        return _get_native()
@noArgsFlattening
@permittedKwargs({'native'})
@FeatureNew('meson.get_external_property', '0.54.0')
def get_external_property_method(self, args: T.Sequence[str], kwargs: dict) -> str:
    if ((len(args) < 1) or (len(args) > 2)):
        raise InterpreterException('Must have one or two positional arguments.')
    propname = args[0]
    if (not isinstance(propname, str)):
        raise InterpreterException('Property name must be string.')

    def _get_native() -> str:
        try:
            props = self.interpreter.environment.properties.build
            return props[propname]
        except Exception:
            if (len(args) == 2):
                return args[1]
            raise InterpreterException(('Unknown native property: %s.' % propname))
    if ('native' in kwargs):
        if kwargs['native']:
            return _get_native()
        else:
            return self.get_cross_property_method(args, {})
    elif self.build.environment.is_cross_build():
        return self.get_cross_property_method(args, kwargs)
    else:
        return _get_native()