From 75af6a6640c15875cdf658ea547590de5983844b Mon Sep 17 00:00:00 2001 From: Alex Boten Date: Thu, 21 May 2020 13:05:29 -0700 Subject: [PATCH 1/2] adding make target for python code generation --- makefile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/makefile b/makefile index b59bb2719..a29600bc0 100755 --- a/makefile +++ b/makefile @@ -38,6 +38,13 @@ gen-java: mkdir -p ./$(GENDIR)/java $(foreach file,$(PROTO_FILES),$(call exec-command, protoc --java_out=./$(GENDIR)/java $(file))) +# Generate ProtoBuf implementation for Python. +.PHONY: gen-python +gen-python: + rm -rf ./$(GENDIR)/python + mkdir -p ./$(GENDIR)/python + $(foreach file,$(PROTO_FILES),$(call exec-command,protoc --python_out=./$(GENDIR)/python $(file))) + # Generate Swagger .PHONY: gen-swagger gen-swagger: From 068aa174c5f1e5ba08ad001cab32142eb55a4f2d Mon Sep 17 00:00:00 2001 From: Alex Boten Date: Mon, 25 May 2020 13:54:38 -0700 Subject: [PATCH 2/2] adding generation TraceService and MetricsService stubs --- makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/makefile b/makefile index a29600bc0..35d3db70e 100755 --- a/makefile +++ b/makefile @@ -43,7 +43,9 @@ gen-java: gen-python: rm -rf ./$(GENDIR)/python mkdir -p ./$(GENDIR)/python - $(foreach file,$(PROTO_FILES),$(call exec-command,protoc --python_out=./$(GENDIR)/python $(file))) + $(foreach file,$(PROTO_FILES),$(call exec-command, protoc --python_out=./$(GENDIR)/python $(file))) + python -m grpc_tools.protoc -I ./ --python_out=./$(GENDIR)/python --grpc_python_out=./$(GENDIR)/python opentelemetry/proto/collector/trace/v1/trace_service.proto + python -m grpc_tools.protoc -I ./ --python_out=./$(GENDIR)/python --grpc_python_out=./$(GENDIR)/python opentelemetry/proto/collector/metrics/v1/metrics_service.proto # Generate Swagger .PHONY: gen-swagger