From 560cb6685c1839d4d40a9db4313a365e3d097420 Mon Sep 17 00:00:00 2001 From: Alex Márquez Pérez Muñíz Díaz Púras Thaureaux Date: Thu, 26 Aug 2021 20:13:29 +0000 Subject: 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 --- python/binary.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'python/binary.go') 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, } -- cgit v1.2.3-59-g8ed1b