Skip to content

Commit

Permalink
Replacing auxiliary proto files with googleapis-common-protos.
Browse files Browse the repository at this point in the history
  • Loading branch information
dhermes committed Jan 14, 2016
1 parent d97004a commit 02553e6
Show file tree
Hide file tree
Showing 33 changed files with 439 additions and 1,888 deletions.
26 changes: 5 additions & 21 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,45 +23,29 @@ generate:
--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/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
$(PROTOS_DIR)/google/bigtable/admin/table/v1/*.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)
mv $(GENERATED_DIR)/google/bigtable/admin/table/v1/* $(FINAL_DIR)
mv $(GENERATED_DIR)/google/api/* $(FINAL_DIR)
mv $(GENERATED_DIR)/google/protobuf/any_pb2.py $(FINAL_DIR)
mv $(GENERATED_DIR)/google/protobuf/duration_pb2.py $(FINAL_DIR)
mv $(GENERATED_DIR)/google/protobuf/empty_pb2.py $(FINAL_DIR)
mv $(GENERATED_DIR)/google/protobuf/timestamp_pb2.py $(FINAL_DIR)
mv $(GENERATED_DIR)/google/longrunning/operations_pb2.py $(FINAL_DIR)
mv $(GENERATED_DIR)/google/rpc/status_pb2.py $(FINAL_DIR)
# Remove all existing *.proto files before we replace
rm -f $(FINAL_DIR)/*.proto
# Copy over the *.proto files into our library.
cp $(PROTOS_DIR)/google/bigtable/v1/*.proto $(FINAL_DIR)
cp $(PROTOS_DIR)/google/bigtable/admin/cluster/v1/*.proto $(FINAL_DIR)
cp $(PROTOS_DIR)/google/bigtable/admin/table/v1/*.proto $(FINAL_DIR)
cp $(PROTOS_DIR)/google/api/*.proto $(FINAL_DIR)
cp $(PROTOS_DIR)/google/protobuf/any.proto $(FINAL_DIR)
cp $(PROTOS_DIR)/google/protobuf/duration.proto $(FINAL_DIR)
cp $(PROTOS_DIR)/google/protobuf/empty.proto $(FINAL_DIR)
cp $(PROTOS_DIR)/google/protobuf/timestamp.proto $(FINAL_DIR)
cp $(PROTOS_DIR)/google/longrunning/operations.proto $(FINAL_DIR)
cp $(PROTOS_DIR)/google/rpc/status.proto $(FINAL_DIR)
# Rename all *.proto files in our library with an
# underscore and remove executable bit.
cd $(FINAL_DIR) && \
for filename in *.proto; do \
chmod -x $$filename ; \
mv $$filename _$$filename ; \
done
# Separate the gRPC parts of the operations service from the
# non-gRPC parts so that the protos from `googleapis-common-protos`
# can be used without gRPC.
python scripts/make_operations_grpc.py
# Rewrite the imports in the generated *_pb2.py files.
python scripts/rewrite_imports.py

Expand Down
29 changes: 0 additions & 29 deletions gcloud/bigtable/_generated/_annotations.proto

This file was deleted.

87 changes: 0 additions & 87 deletions gcloud/bigtable/_generated/_any.proto

This file was deleted.

78 changes: 0 additions & 78 deletions gcloud/bigtable/_generated/_duration.proto

This file was deleted.

34 changes: 0 additions & 34 deletions gcloud/bigtable/_generated/_empty.proto

This file was deleted.

Loading

0 comments on commit 02553e6

Please sign in to comment.