diff options
| author | Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> | 2023-08-28 17:18:29 +0000 |
|---|---|---|
| committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2023-08-28 17:18:29 +0000 |
| commit | 7eb6ffc796c4bd5ad1ed0903577c7a3654903130 (patch) | |
| tree | 12b0cc8a4b42f0167751360ff205f6cd1ec4654a /python/python.go | |
| parent | 5dbb696c53d7f6f593e2aeb52fae611812adc613 (diff) | |
| parent | e8a90c57e0500bc25aba0e665cd3032c496d9571 (diff) | |
Merge changes from topic "java-proto-include-dir" into main
* changes:
Handle proto.include_dirs for java
Translate python_libray.pkg_path to proto.import_prefix
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 e6bdeee2c..8b31c6c81 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 } |
