Bob Badour | abbd5c6 | 2022-08-18 10:45:29 -0700 | [diff] [blame] | 1 | package { |
| 2 | default_applicable_licenses: [ |
| 3 | "external_pandora_bt-test-interfaces_license", |
| 4 | ], |
| 5 | } |
| 6 | |
| 7 | // Added automatically by a large-scale-change |
| 8 | // See: http://go/android-license-faq |
| 9 | license { |
| 10 | name: "external_pandora_bt-test-interfaces_license", |
| 11 | visibility: [":__subpackages__"], |
| 12 | license_kinds: [ |
| 13 | "SPDX-license-identifier-Apache-2.0", |
| 14 | ], |
| 15 | license_text: [ |
| 16 | "LICENSE", |
| 17 | ], |
| 18 | } |
| 19 | |
Charlie Boutier | dc44a6a | 2022-09-14 23:42:33 +0000 | [diff] [blame^] | 20 | genrule { |
| 21 | name: "protoc-gen-mmi2grpc-python-src-interfaces", |
| 22 | srcs: ["python/_build/protoc-gen-custom_grpc"], |
| 23 | cmd: "cp $(in) $(out)", |
| 24 | out: ["protoc-gen-custom_grpc.py"], |
| 25 | } |
| 26 | |
David Duarte | 1a3f594 | 2022-08-11 02:46:44 +0000 | [diff] [blame] | 27 | python_binary_host { |
| 28 | name: "protoc-gen-custom_grpc", |
Charlie Boutier | dc44a6a | 2022-09-14 23:42:33 +0000 | [diff] [blame^] | 29 | main: "protoc-gen-custom_grpc.py", |
| 30 | srcs: [":protoc-gen-mmi2grpc-python-src-interfaces"], |
David Duarte | 1a3f594 | 2022-08-11 02:46:44 +0000 | [diff] [blame] | 31 | libs: ["libprotobuf-python"], |
| 32 | } |
| 33 | |
| 34 | genrule { |
| 35 | name: "pandora-python-src", |
| 36 | tools: [ |
| 37 | "aprotoc", |
| 38 | "protoc-gen-custom_grpc" |
| 39 | ], |
| 40 | cmd: "$(location aprotoc)" + |
| 41 | " -Iexternal/pandora/bt-test-interfaces" + |
| 42 | " -Iexternal/protobuf/src" + |
| 43 | " --plugin=protoc-gen-grpc=$(location protoc-gen-custom_grpc)" + |
| 44 | " --grpc_out=$(genDir)" + |
| 45 | " --python_out=$(genDir)" + |
| 46 | " $(in)", |
| 47 | srcs: [ |
| 48 | "pandora/a2dp.proto", |
| 49 | "pandora/host.proto", |
| 50 | ], |
| 51 | out: [ |
| 52 | "pandora/a2dp_grpc.py", |
| 53 | "pandora/a2dp_pb2.py", |
| 54 | "pandora/host_grpc.py", |
| 55 | "pandora/host_pb2.py", |
| 56 | ] |
| 57 | } |
| 58 | |
| 59 | python_library_host { |
| 60 | name: "pandora-python", |
| 61 | srcs: [ |
| 62 | ":pandora-python-src", |
| 63 | ], |
| 64 | } |