diff options
author | Liz Kammer <eakammer@google.com> | 2020-06-22 11:52:59 -0700 |
---|---|---|
committer | Liz Kammer <eakammer@google.com> | 2020-06-22 15:51:39 -0700 |
commit | e0070ee3134f46139b5b8e0f30b43c78144724b2 (patch) | |
tree | 8d77f50291defa4ca78bce92a508c78e0fa6844c /python/python.go | |
parent | ea34d87759a70da45d95f37f8df4d4c917144d45 (diff) |
Implement OutputFiles for python modules.
This enables python binaries to be included in data properties with the
format ":module".
Test: m FirmwareDtboVerification with local changes
Bug: 153848038
Change-Id: I2a02dc382fcbb142d8e4fbdbb6ca461986627d25
Diffstat (limited to 'python/python.go')
-rw-r--r-- | python/python.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/python/python.go b/python/python.go index 8b912be17..a6c9e2a07 100644 --- a/python/python.go +++ b/python/python.go @@ -251,6 +251,18 @@ func (p *Module) HostToolPath() android.OptionalPath { return android.OptionalPathForPath(p.installer.(*binaryDecorator).path) } +func (p *Module) OutputFiles(tag string) (android.Paths, error) { + switch tag { + case "": + if outputFile := p.installSource; outputFile.Valid() { + return android.Paths{outputFile.Path()}, nil + } + return android.Paths{}, nil + default: + return nil, fmt.Errorf("unsupported module reference tag %q", tag) + } +} + func (p *Module) isEmbeddedLauncherEnabled(actual_version string) bool { switch actual_version { case pyVersion2: |