aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2016-02-13 14:59:35 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2016-02-17 14:45:50 +0530
commit601ff9162216d4ff6202231f51241c0d4b6f712f (patch)
tree41facbb58dc75312152ea72167940d1176a00bf4
parent36c9a165ed50df6a173cbd0815f6ff39e5b15355 (diff)
downloadmeson-601ff9162216d4ff6202231f51241c0d4b6f712f.zip
meson-601ff9162216d4ff6202231f51241c0d4b6f712f.tar.gz
meson-601ff9162216d4ff6202231f51241c0d4b6f712f.tar.bz2
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
-rw-r--r--mesonbuild/interpreter.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py
index a633917..4d41f1a 100644
--- a/mesonbuild/interpreter.py
+++ b/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()