summaryrefslogtreecommitdiff
path: root/python/binary.go
diff options
context:
space:
mode:
author Alex Márquez Pérez Muñíz Díaz Púras Thaureaux <alexmarquez@google.com> 2021-08-26 20:13:29 +0000
committer Alex Márquez Pérez Muñíz Díaz Púras Thaureaux <alexmarquez@google.com> 2021-08-27 14:10:33 +0000
commit560cb6685c1839d4d40a9db4313a365e3d097420 (patch)
treebc9de747be823ee796d09a33e7d4e40ec32baaf1 /python/binary.go
parent5602d33025c7af2fcd2d7e17a567048b8f12b9f5 (diff)
python_{binary,library}{,_host} handle lib property
Have binary and library bp2build convert `libs` to `deps` for bazel Bug: 196083751 Test: python_{binary,library}_conversion_test.go Test: build/bazel/ci/mixed_{libc,droid}.sh Change-Id: I2d5f6ef2e83dd608910edb7adb2eb9a56d25293c
Diffstat (limited to 'python/binary.go')
-rw-r--r--python/binary.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/python/binary.go b/python/binary.go
index b1065369c..bc2768c72 100644
--- a/python/binary.go
+++ b/python/binary.go
@@ -38,6 +38,7 @@ type bazelPythonBinaryAttributes struct {
Main string
Srcs bazel.LabelListAttribute
Data bazel.LabelListAttribute
+ Deps bazel.LabelListAttribute
Python_version string
}
@@ -81,11 +82,13 @@ func PythonBinaryBp2Build(ctx android.TopDownMutatorContext) {
srcs := android.BazelLabelForModuleSrcExcludes(ctx, m.properties.Srcs, m.properties.Exclude_srcs)
data := android.BazelLabelForModuleSrc(ctx, m.properties.Data)
+ deps := android.BazelLabelForModuleDeps(ctx, m.properties.Libs)
attrs := &bazelPythonBinaryAttributes{
Main: main,
Srcs: bazel.MakeLabelListAttribute(srcs),
Data: bazel.MakeLabelListAttribute(data),
+ Deps: bazel.MakeLabelListAttribute(deps),
Python_version: python_version,
}