make: Generate grpc bindings if we want to test with rust enabled

This commit is contained in:
Christian Decker
2022-01-17 17:54:08 +01:00
committed by Rusty Russell
parent 8bc4f0137a
commit f3d95530f4

View File

@@ -359,6 +359,17 @@ endif
ifneq ($(RUST),0)
include cln-rpc/Makefile
include cln-grpc/Makefile
GRPC_GEN = tests/node_pb2.py \
tests/node_pb2_grpc.py \
tests/primitives_pb2.py
ALL_TEST_GEN += $(GRPC_GEN)
$(GRPC_GEN): cln-grpc/proto/node.proto cln-grpc/proto/primitives.proto
python -m grpc_tools.protoc -I cln-grpc/proto cln-grpc/proto/node.proto --python_out=tests/ --grpc_python_out=tests/ --experimental_allow_proto3_optional
python -m grpc_tools.protoc -I cln-grpc/proto cln-grpc/proto/primitives.proto --python_out=tests/ --grpc_python_out=tests/ --experimental_allow_proto3_optional
endif
# We make pretty much everything depend on these.