Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -425,8 +425,10 @@ ifneq ($V,1)
MSGGEN_ARGS := -s
endif

ifneq ($(SUPPRESS_GENERATION),1)
$(MSGGEN_GENALL)&: contrib/msggen/msggen/schema.json
@$(call VERBOSE, "msggen $@", PYTHONPATH=contrib/msggen $(PYTHON) contrib/msggen/msggen/__main__.py $(MSGGEN_ARGS) generate)
endif

# The compiler assumes that the proto files are in the same
# directory structure as the generated files will be. Since we
Expand All @@ -441,11 +443,13 @@ GRPC_GEN = \

ALL_TEST_GEN += $(GRPC_GEN)

ifneq ($(SUPPRESS_GENERATION),1)
$(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=$(GRPC_PATH)/ --grpc_python_out=$(GRPC_PATH)/ --experimental_allow_proto3_optional
$(PYTHON) -m grpc_tools.protoc -I cln-grpc/proto cln-grpc/proto/primitives.proto --python_out=$(GRPC_PATH)/ --experimental_allow_proto3_optional
find $(GRPC_DIR)/ -type f -name "*.py" -print0 | xargs -0 $(SED) -i'.bak' -e 's/^import \(.*\)_pb2 as .*__pb2/from pyln.grpc import \1_pb2 as \1__pb2/g'
find $(GRPC_DIR)/ -type f -name "*.py.bak" -print0 | xargs -0 rm -f
endif

# We make pretty much everything depend on these.
ALL_GEN_HEADERS := $(filter %gen.h,$(ALL_C_HEADERS))
Expand Down
Loading