diff options
Diffstat (limited to 'python/python.go')
-rw-r--r-- | python/python.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/python/python.go b/python/python.go index 6c837a888..7d77ca772 100644 --- a/python/python.go +++ b/python/python.go @@ -197,6 +197,14 @@ func (p *PythonLibraryModule) getPkgPath() string { return String(p.properties.Pkg_path) } +// PkgPath is the "public" version of `getPkgPath` that is only available during bp2build +func (p *PythonLibraryModule) PkgPath(ctx android.BazelConversionContext) *string { + if ctx.Config().BuildMode != android.Bp2build { + ctx.ModuleErrorf("PkgPath is only supported in bp2build mode") + } + return p.properties.Pkg_path +} + func (p *PythonLibraryModule) getBaseProperties() *BaseProperties { return &p.properties } |