@FeatureNew('meson.override_find_program', '0.46.0')
@permittedKwargs({})
def override_find_program_method(self, args, kwargs):
    if (len(args) != 2):
        raise InterpreterException('Override needs two arguments')
    (name, exe) = args
    if (not isinstance(name, str)):
        raise InterpreterException('First argument must be a string')
    if hasattr(exe, 'held_object'):
        exe = exe.held_object
    if isinstance(exe, mesonlib.File):
        abspath = exe.absolute_path(self.interpreter.environment.source_dir, self.interpreter.environment.build_dir)
        if (not os.path.exists(abspath)):
            raise InterpreterException(('Tried to override %s with a file that does not exist.' % name))
        exe = OverrideProgram(abspath)
    if (not isinstance(exe, (dependencies.ExternalProgram, build.Executable))):
        raise InterpreterException('Second argument must be an external program or executable.')
    self.interpreter.add_find_program_override(name, exe)
@FeatureNew('meson.override_find_program', '0.46.0')
@permittedKwargs({})
def override_find_program_method(self, args, kwargs):
    if (len(args) != 2):
        raise InterpreterException('Override needs two arguments')
    (name, exe) = args
    if (not isinstance(name, str)):
        raise InterpreterException('First argument must be a string')
    if hasattr(exe, 'held_object'):
        exe = exe.held_object
    if isinstance(exe, mesonlib.File):
        abspath = exe.absolute_path(self.interpreter.environment.source_dir, self.interpreter.environment.build_dir)
        if (not os.path.exists(abspath)):
            raise InterpreterException(('Tried to override %s with a file that does not exist.' % name))
        exe = OverrideProgram(abspath)
    if (not isinstance(exe, (dependencies.ExternalProgram, build.Executable))):
        raise InterpreterException('Second argument must be an external program or executable.')
    self.interpreter.add_find_program_override(name, exe)