11GENERATED_DIR =$(shell pwd) /generated_python
2- FINAL_DIR =$(shell pwd) /gcloud/bigtable/_generated
2+ BT_DIR =$(shell pwd) /gcloud/bigtable/_generated
33GRPC_PLUGIN =grpc_python_plugin
44PROTOC_CMD =protoc
5- PROTOS_DIR =$(shell pwd) /cloud-bigtable-client/bigtable-protos/src/main/proto
5+ BT_PROTOS_DIR =$(shell pwd) /cloud-bigtable-client/bigtable-protos/src/main/proto
66
77help :
88 @echo ' Makefile for gcloud-python Bigtable protos '
@@ -17,37 +17,37 @@ generate:
1717 mkdir -p $(GENERATED_DIR )
1818 # Generate all *_pb2.py files that require gRPC.
1919 $(PROTOC_CMD ) \
20- --proto_path=$(PROTOS_DIR ) \
20+ --proto_path=$(BT_PROTOS_DIR ) \
2121 --python_out=$(GENERATED_DIR ) \
2222 --plugin=protoc-gen-grpc=$(GRPC_PLUGIN ) \
2323 --grpc_out=$(GENERATED_DIR ) \
24- $(PROTOS_DIR ) /google/bigtable/v1/bigtable_service.proto \
25- $(PROTOS_DIR ) /google/bigtable/admin/cluster/v1/bigtable_cluster_service.proto \
26- $(PROTOS_DIR ) /google/bigtable/admin/table/v1/bigtable_table_service.proto
24+ $(BT_PROTOS_DIR ) /google/bigtable/v1/bigtable_service.proto \
25+ $(BT_PROTOS_DIR ) /google/bigtable/admin/cluster/v1/bigtable_cluster_service.proto \
26+ $(BT_PROTOS_DIR ) /google/bigtable/admin/table/v1/bigtable_table_service.proto
2727 # Generate all *_pb2.py files that do not require gRPC.
2828 $(PROTOC_CMD ) \
29- --proto_path=$(PROTOS_DIR ) \
29+ --proto_path=$(BT_PROTOS_DIR ) \
3030 --python_out=$(GENERATED_DIR ) \
31- $(PROTOS_DIR ) /google/bigtable/v1/bigtable_data.proto \
32- $(PROTOS_DIR ) /google/bigtable/v1/bigtable_service_messages.proto \
33- $(PROTOS_DIR ) /google/bigtable/admin/cluster/v1/bigtable_cluster_data.proto \
34- $(PROTOS_DIR ) /google/bigtable/admin/cluster/v1/bigtable_cluster_service_messages.proto \
35- $(PROTOS_DIR ) /google/bigtable/admin/table/v1/bigtable_table_data.proto \
36- $(PROTOS_DIR ) /google/bigtable/admin/table/v1/bigtable_table_service_messages.proto
31+ $(BT_PROTOS_DIR ) /google/bigtable/v1/bigtable_data.proto \
32+ $(BT_PROTOS_DIR ) /google/bigtable/v1/bigtable_service_messages.proto \
33+ $(BT_PROTOS_DIR ) /google/bigtable/admin/cluster/v1/bigtable_cluster_data.proto \
34+ $(BT_PROTOS_DIR ) /google/bigtable/admin/cluster/v1/bigtable_cluster_service_messages.proto \
35+ $(BT_PROTOS_DIR ) /google/bigtable/admin/table/v1/bigtable_table_data.proto \
36+ $(BT_PROTOS_DIR ) /google/bigtable/admin/table/v1/bigtable_table_service_messages.proto
3737 # Move the newly generated *_pb2.py files into our library.
38- mv $(GENERATED_DIR ) /google/bigtable/v1/* $(FINAL_DIR )
39- mv $(GENERATED_DIR ) /google/bigtable/admin/cluster/v1/* $(FINAL_DIR )
40- mv $(GENERATED_DIR ) /google/bigtable/admin/table/v1/* $(FINAL_DIR )
38+ mv $(GENERATED_DIR ) /google/bigtable/v1/* $(BT_DIR )
39+ mv $(GENERATED_DIR ) /google/bigtable/admin/cluster/v1/* $(BT_DIR )
40+ mv $(GENERATED_DIR ) /google/bigtable/admin/table/v1/* $(BT_DIR )
4141 # Remove all existing *.proto files before we replace
42- rm -f $(FINAL_DIR ) /* .proto
42+ rm -f $(BT_DIR ) /* .proto
4343 # Copy over the *.proto files into our library.
44- cp $(PROTOS_DIR ) /google/bigtable/v1/* .proto $(FINAL_DIR )
45- cp $(PROTOS_DIR ) /google/bigtable/admin/cluster/v1/* .proto $(FINAL_DIR )
46- cp $(PROTOS_DIR ) /google/bigtable/admin/table/v1/* .proto $(FINAL_DIR )
47- cp $(PROTOS_DIR ) /google/longrunning/operations.proto $(FINAL_DIR )
44+ cp $(BT_PROTOS_DIR ) /google/bigtable/v1/* .proto $(BT_DIR )
45+ cp $(BT_PROTOS_DIR ) /google/bigtable/admin/cluster/v1/* .proto $(BT_DIR )
46+ cp $(BT_PROTOS_DIR ) /google/bigtable/admin/table/v1/* .proto $(BT_DIR )
47+ cp $(BT_PROTOS_DIR ) /google/longrunning/operations.proto $(BT_DIR )
4848 # Rename all *.proto files in our library with an
4949 # underscore and remove executable bit.
50- cd $(FINAL_DIR ) && \
50+ cd $(BT_DIR ) && \
5151 for filename in * .proto; do \
5252 chmod -x $$ filename ; \
5353 mv $$ filename _$$ filename ; \
0 commit comments