Translate python_libray.pkg_path to proto.import_prefix am: cb847638af

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2721823

Change-Id: Ib5f6ee9478486881d6b4b079791bab78f2b3c2ca
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Spandan Das
2023-08-28 17:54:36 +00:00
committed by Automerger Merge Worker
3 changed files with 60 additions and 0 deletions

View File

@@ -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
}