summaryrefslogtreecommitdiff
path: root/python/library.go
diff options
context:
space:
mode:
Diffstat (limited to 'python/library.go')
-rw-r--r--python/library.go11
1 files changed, 9 insertions, 2 deletions
diff --git a/python/library.go b/python/library.go
index d026c1323..df92df42b 100644
--- a/python/library.go
+++ b/python/library.go
@@ -43,9 +43,14 @@ func PythonLibraryHostFactory() android.Module {
type bazelPythonLibraryAttributes struct {
Srcs bazel.LabelListAttribute
Deps bazel.LabelListAttribute
+ Imports bazel.StringListAttribute
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
@@ -65,15 +70,17 @@ func pythonLibBp2Build(ctx android.TopDownMutatorContext, m *Module) {
}
baseAttrs := m.makeArchVariantBaseAttributes(ctx)
+
attrs := &bazelPythonLibraryAttributes{
Srcs: baseAttrs.Srcs,
Deps: baseAttrs.Deps,
Srcs_version: python_version,
+ Imports: baseAttrs.Imports,
}
props := bazel.BazelTargetModuleProperties{
- Rule_class: "py_library",
- Bzl_load_location: "//build/bazel/rules/python:library.bzl",
+ // Use the native py_library rule.
+ Rule_class: "py_library",
}
ctx.CreateBazelTargetModule(props, android.CommonAttributes{