• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1package {
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
20genrule {
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
27python_binary_host {
28    name: "protoc-gen-custom_grpc",
29    main: "protoc-gen-custom_grpc.py",
30    srcs: [":protoc-gen-mmi2grpc-python-src-interfaces"],
31    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}
65