Skip to content

Commit

Permalink
Updating Makefile to only use gRPC when needed.
Browse files Browse the repository at this point in the history
  • Loading branch information
dhermes committed Dec 23, 2015
1 parent 4d9e110 commit 959cbfa
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,31 @@ generate:
[ -d cloud-bigtable-client ] || git clone https://github.com/GoogleCloudPlatform/cloud-bigtable-client
cd cloud-bigtable-client && git pull origin master
mkdir -p $(GENERATED_DIR)
# Generate all *_pb2.py files.
# Generate all *_pb2.py files that require gRPC.
$(PROTOC_CMD) \
--proto_path=$(PROTOS_DIR) \
--plugin=protoc-gen-grpc=$(GRPC_PLUGIN) \
--python_out=$(GENERATED_DIR) \
--grpc_out=$(GENERATED_DIR) \
$(PROTOS_DIR)/google/bigtable/v1/*.proto \
$(PROTOS_DIR)/google/bigtable/admin/cluster/v1/*.proto \
$(PROTOS_DIR)/google/bigtable/admin/table/v1/*.proto \
$(PROTOS_DIR)/google/bigtable/v1/bigtable_service.proto \
$(PROTOS_DIR)/google/bigtable/admin/cluster/v1/bigtable_cluster_service.proto \
$(PROTOS_DIR)/google/bigtable/admin/table/v1/bigtable_table_service.proto \
$(PROTOS_DIR)/google/longrunning/operations.proto
# Generate all *_pb2.py files that do not require gRPC.
$(PROTOC_CMD) \
--proto_path=$(PROTOS_DIR) \
--python_out=$(GENERATED_DIR) \
$(PROTOS_DIR)/google/bigtable/v1/bigtable_data.proto \
$(PROTOS_DIR)/google/bigtable/v1/bigtable_service_messages.proto \
$(PROTOS_DIR)/google/bigtable/admin/cluster/v1/bigtable_cluster_data.proto \
$(PROTOS_DIR)/google/bigtable/admin/cluster/v1/bigtable_cluster_service_messages.proto \
$(PROTOS_DIR)/google/bigtable/admin/table/v1/bigtable_table_data.proto \
$(PROTOS_DIR)/google/bigtable/admin/table/v1/bigtable_table_service_messages.proto \
$(PROTOS_DIR)/google/api/*.proto \
$(PROTOS_DIR)/google/protobuf/any.proto \
$(PROTOS_DIR)/google/protobuf/duration.proto \
$(PROTOS_DIR)/google/protobuf/empty.proto \
$(PROTOS_DIR)/google/protobuf/timestamp.proto \
$(PROTOS_DIR)/google/longrunning/operations.proto \
$(PROTOS_DIR)/google/rpc/status.proto
# Move the newly generated *_pb2.py files into our library.
mv $(GENERATED_DIR)/google/bigtable/v1/* $(FINAL_DIR)
Expand Down

0 comments on commit 959cbfa

Please sign in to comment.