From 0ef0fcb7855be4adfa2290629f698fa5fa5f3a87 Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Mon, 17 Jan 2022 17:54:08 +0100 Subject: [PATCH] make: Generate grpc bindings if we want to test with rust enabled --- Makefile | 11 +++++++++++ requirements.txt | 3 +++ 2 files changed, 14 insertions(+) diff --git a/Makefile b/Makefile index d630ce4b3162..a1766fd74a1e 100644 --- a/Makefile +++ b/Makefile @@ -358,6 +358,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/ + python -m grpc_tools.protoc -I cln-grpc/proto cln-grpc/proto/primitives.proto --python_out=tests/ --grpc_python_out=tests/ + endif # We make pretty much everything depend on these. diff --git a/requirements.txt b/requirements.txt index 4986279a274f..a955ff7daca6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,6 +8,9 @@ websocket-client ./contrib/pyln-proto ./contrib/pyln-testing +grpcio==1.34.0 +grpcio-tools==1.34.0 + # Dependencies from pyln-spec # None