blob: c15b5c7b4e61a82337fb5416c89b98755738e808 [file] [log] [blame]
Bob Badourabbd5c62022-08-18 10:45:29 -07001package {
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
9license {
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 Boutierdc44a6a2022-09-14 23:42:33 +000020genrule {
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 Duarte1a3f5942022-08-11 02:46:44 +000027python_binary_host {
28 name: "protoc-gen-custom_grpc",
Charlie Boutierdc44a6a2022-09-14 23:42:33 +000029 main: "protoc-gen-custom_grpc.py",
30 srcs: [":protoc-gen-mmi2grpc-python-src-interfaces"],
David Duarte1a3f5942022-08-11 02:46:44 +000031 libs: ["libprotobuf-python"],
32}
33
34genrule {
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
59python_library_host {
60 name: "pandora-python",
61 srcs: [
62 ":pandora-python-src",
63 ],
64}