From 2db43d38337d4617a1401579db6d0cec6098f303 Mon Sep 17 00:00:00 2001 From: Danny Hermes Date: Wed, 6 Jan 2016 17:57:47 -0800 Subject: [PATCH] Updating Makefile to only use gRPC when needed. Also re-running the generate rule and updating the files that don't need gRPC. --- Makefile | 20 ++++++++++++++----- .../_generated/bigtable_cluster_data_pb2.py | 6 ------ .../bigtable_cluster_service_messages_pb2.py | 6 ------ .../bigtable/_generated/bigtable_data_pb2.py | 6 ------ .../bigtable_service_messages_pb2.py | 6 ------ .../_generated/bigtable_table_data_pb2.py | 6 ------ .../bigtable_table_service_messages_pb2.py | 6 ------ 7 files changed, 15 insertions(+), 41 deletions(-) diff --git a/Makefile b/Makefile index 4aac66837cf5..64040005d325 100644 --- a/Makefile +++ b/Makefile @@ -15,15 +15,25 @@ 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) \ + --plugin=protoc-gen-grpc=$(GRPC_PLUGIN) \ --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 + # 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 # Move the newly generated *_pb2.py files into our library. mv $(GENERATED_DIR)/google/bigtable/v1/* $(FINAL_DIR) mv $(GENERATED_DIR)/google/bigtable/admin/cluster/v1/* $(FINAL_DIR) diff --git a/gcloud/bigtable/_generated/bigtable_cluster_data_pb2.py b/gcloud/bigtable/_generated/bigtable_cluster_data_pb2.py index cba895acf7b3..fa8b7cfc3399 100644 --- a/gcloud/bigtable/_generated/bigtable_cluster_data_pb2.py +++ b/gcloud/bigtable/_generated/bigtable_cluster_data_pb2.py @@ -221,10 +221,4 @@ DESCRIPTOR.has_options = True DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), b'\n$com.google.bigtable.admin.cluster.v1B\030BigtableClusterDataProtoP\001') -import abc -from grpc.beta import implementations as beta_implementations -from grpc.early_adopter import implementations as early_adopter_implementations -from grpc.framework.alpha import utilities as alpha_utilities -from grpc.framework.common import cardinality -from grpc.framework.interfaces.face import utilities as face_utilities # @@protoc_insertion_point(module_scope) diff --git a/gcloud/bigtable/_generated/bigtable_cluster_service_messages_pb2.py b/gcloud/bigtable/_generated/bigtable_cluster_service_messages_pb2.py index 121e9bc7acef..fd786b397684 100644 --- a/gcloud/bigtable/_generated/bigtable_cluster_service_messages_pb2.py +++ b/gcloud/bigtable/_generated/bigtable_cluster_service_messages_pb2.py @@ -535,10 +535,4 @@ DESCRIPTOR.has_options = True DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), b'\n$com.google.bigtable.admin.cluster.v1B#BigtableClusterServiceMessagesProtoP\001') -import abc -from grpc.beta import implementations as beta_implementations -from grpc.early_adopter import implementations as early_adopter_implementations -from grpc.framework.alpha import utilities as alpha_utilities -from grpc.framework.common import cardinality -from grpc.framework.interfaces.face import utilities as face_utilities # @@protoc_insertion_point(module_scope) diff --git a/gcloud/bigtable/_generated/bigtable_data_pb2.py b/gcloud/bigtable/_generated/bigtable_data_pb2.py index 58a3b7bb3cd9..e3183a41b388 100644 --- a/gcloud/bigtable/_generated/bigtable_data_pb2.py +++ b/gcloud/bigtable/_generated/bigtable_data_pb2.py @@ -1176,10 +1176,4 @@ DESCRIPTOR.has_options = True DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), b'\n\026com.google.bigtable.v1B\021BigtableDataProtoP\001') -import abc -from grpc.beta import implementations as beta_implementations -from grpc.early_adopter import implementations as early_adopter_implementations -from grpc.framework.alpha import utilities as alpha_utilities -from grpc.framework.common import cardinality -from grpc.framework.interfaces.face import utilities as face_utilities # @@protoc_insertion_point(module_scope) diff --git a/gcloud/bigtable/_generated/bigtable_service_messages_pb2.py b/gcloud/bigtable/_generated/bigtable_service_messages_pb2.py index 0dec720979e1..83f9b24a2a68 100644 --- a/gcloud/bigtable/_generated/bigtable_service_messages_pb2.py +++ b/gcloud/bigtable/_generated/bigtable_service_messages_pb2.py @@ -529,10 +529,4 @@ DESCRIPTOR.has_options = True DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), b'\n\026com.google.bigtable.v1B\034BigtableServiceMessagesProtoP\001') -import abc -from grpc.beta import implementations as beta_implementations -from grpc.early_adopter import implementations as early_adopter_implementations -from grpc.framework.alpha import utilities as alpha_utilities -from grpc.framework.common import cardinality -from grpc.framework.interfaces.face import utilities as face_utilities # @@protoc_insertion_point(module_scope) diff --git a/gcloud/bigtable/_generated/bigtable_table_data_pb2.py b/gcloud/bigtable/_generated/bigtable_table_data_pb2.py index 37274ca2358a..fd47b567b3c5 100644 --- a/gcloud/bigtable/_generated/bigtable_table_data_pb2.py +++ b/gcloud/bigtable/_generated/bigtable_table_data_pb2.py @@ -374,10 +374,4 @@ DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), b'\n\"com.google.bigtable.admin.table.v1B\026BigtableTableDataProtoP\001') _TABLE_COLUMNFAMILIESENTRY.has_options = True _TABLE_COLUMNFAMILIESENTRY._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), b'8\001') -import abc -from grpc.beta import implementations as beta_implementations -from grpc.early_adopter import implementations as early_adopter_implementations -from grpc.framework.alpha import utilities as alpha_utilities -from grpc.framework.common import cardinality -from grpc.framework.interfaces.face import utilities as face_utilities # @@protoc_insertion_point(module_scope) diff --git a/gcloud/bigtable/_generated/bigtable_table_service_messages_pb2.py b/gcloud/bigtable/_generated/bigtable_table_service_messages_pb2.py index 7daf7e347025..582dfed94612 100644 --- a/gcloud/bigtable/_generated/bigtable_table_service_messages_pb2.py +++ b/gcloud/bigtable/_generated/bigtable_table_service_messages_pb2.py @@ -386,10 +386,4 @@ DESCRIPTOR.has_options = True DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), b'\n\"com.google.bigtable.admin.table.v1B!BigtableTableServiceMessagesProtoP\001') -import abc -from grpc.beta import implementations as beta_implementations -from grpc.early_adopter import implementations as early_adopter_implementations -from grpc.framework.alpha import utilities as alpha_utilities -from grpc.framework.common import cardinality -from grpc.framework.interfaces.face import utilities as face_utilities # @@protoc_insertion_point(module_scope)