Add HostToolPath() for Python binary
So in the genrule, Python binary module can be used as tool.
Test: manually write a test genrule.
Change-Id: Idfd3af4c1002dd608e1bdffa203e01c802f1bf21
diff --git a/python/python.go b/python/python.go
index 05efbea..9a3b1bb 100644
--- a/python/python.go
+++ b/python/python.go
@@ -242,6 +242,14 @@
}
}
+func (p *Module) HostToolPath() android.OptionalPath {
+ if p.installer == nil {
+ // python_library is just meta module, and doesn't have any installer.
+ return android.OptionalPath{}
+ }
+ return android.OptionalPathForPath(p.installer.(*binaryDecorator).path)
+}
+
func (p *Module) isEmbeddedLauncherEnabled(actual_version string) bool {
switch actual_version {
case pyVersion2: