aboutsummaryrefslogtreecommitdiff
path: root/Android.bp
blob: 1dd9f1e27f1e8186f4f621d1a1a87ae41972843d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
python_binary_host {
    name: "protoc-gen-custom_grpc",
    main: "python/_build/protoc-gen-custom_grpc.py",
    srcs: ["python/_build/protoc-gen-custom_grpc.py"],
    libs: ["libprotobuf-python"],
}

genrule {
    name: "pandora-python-src",
    tools: [
        "aprotoc",
        "protoc-gen-custom_grpc"
    ],
    cmd: "$(location aprotoc)" +
         "    -Iexternal/pandora/bt-test-interfaces" +
         "    -Iexternal/protobuf/src" +
         "    --plugin=protoc-gen-grpc=$(location protoc-gen-custom_grpc)" +
         "    --grpc_out=$(genDir)" +
         "    --python_out=$(genDir)" +
         "    $(in)",
    srcs: [
        "pandora/a2dp.proto",
        "pandora/host.proto",
    ],
    out: [
        "pandora/a2dp_grpc.py",
        "pandora/a2dp_pb2.py",
        "pandora/host_grpc.py",
        "pandora/host_pb2.py",
    ]
}

python_library_host {
    name: "pandora-python",
    srcs: [
        ":pandora-python-src",
    ],
}