Add bp2build converter for python protobuf files

Bug: 196084681
Test: b run //build/bazel/examples/python/protobuf:build_bazel_examples_python_protobuf_main --config=linux_x86_64
Change-Id: I4d806902d262351231f64686a5d24513a25d9749
This commit is contained in:
Cole Faust
2022-05-12 15:37:02 -07:00
parent ec6c065af6
commit 53b62098d0
5 changed files with 78 additions and 3 deletions

View File

@@ -50,6 +50,10 @@ type bazelPythonLibraryAttributes struct {
Srcs_version *string
}
type bazelPythonProtoLibraryAttributes struct {
Deps bazel.LabelListAttribute
}
func pythonLibBp2Build(ctx android.TopDownMutatorContext, m *Module) {
// TODO(b/182306917): this doesn't fully handle all nested props versioned
// by the python version, which would have been handled by the version split
@@ -96,6 +100,7 @@ func pythonLibBp2Build(ctx android.TopDownMutatorContext, m *Module) {
}
baseAttrs := m.makeArchVariantBaseAttributes(ctx)
attrs := &bazelPythonLibraryAttributes{
Srcs: baseAttrs.Srcs,
Deps: baseAttrs.Deps,