David Duarte | 1a3f594 | 2022-08-11 02:46:44 +0000 | [diff] [blame^] | 1 | python_binary_host { |
| 2 | name: "protoc-gen-custom_grpc", |
| 3 | main: "python/_build/protoc-gen-custom_grpc.py", |
| 4 | srcs: ["python/_build/protoc-gen-custom_grpc.py"], |
| 5 | libs: ["libprotobuf-python"], |
| 6 | } |
| 7 | |
| 8 | genrule { |
| 9 | name: "pandora-python-src", |
| 10 | tools: [ |
| 11 | "aprotoc", |
| 12 | "protoc-gen-custom_grpc" |
| 13 | ], |
| 14 | cmd: "$(location aprotoc)" + |
| 15 | " -Iexternal/pandora/bt-test-interfaces" + |
| 16 | " -Iexternal/protobuf/src" + |
| 17 | " --plugin=protoc-gen-grpc=$(location protoc-gen-custom_grpc)" + |
| 18 | " --grpc_out=$(genDir)" + |
| 19 | " --python_out=$(genDir)" + |
| 20 | " $(in)", |
| 21 | srcs: [ |
| 22 | "pandora/a2dp.proto", |
| 23 | "pandora/host.proto", |
| 24 | ], |
| 25 | out: [ |
| 26 | "pandora/a2dp_grpc.py", |
| 27 | "pandora/a2dp_pb2.py", |
| 28 | "pandora/host_grpc.py", |
| 29 | "pandora/host_pb2.py", |
| 30 | ] |
| 31 | } |
| 32 | |
| 33 | python_library_host { |
| 34 | name: "pandora-python", |
| 35 | srcs: [ |
| 36 | ":pandora-python-src", |
| 37 | ], |
| 38 | } |