| 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", |
| ], |
| } |