interpreter: Add path() method to ExternalProgramHolder types

In practice, this means we can do

 flex = find_program('flex')
 flex.path() # Gives the full path to the flex binary
pull/388/head
Nirbheek Chauhan 9 years ago
parent 36c9a165ed
commit 601ff91622
  1. 6
      mesonbuild/interpreter.py

@ -242,11 +242,15 @@ class ExternalProgramHolder(InterpreterObject):
def __init__(self, ep):
InterpreterObject.__init__(self)
self.held_object = ep
self.methods.update({'found': self.found_method})
self.methods.update({'found': self.found_method,
'path': self.path_method})
def found_method(self, args, kwargs):
return self.found()
def path_method(self, args, kwargs):
return self.get_command()
def found(self):
return self.held_object.found()

Loading…
Cancel
Save