11GENERATED_DIR =$(shell pwd) /generated_python
2- BT_DIR =$(shell pwd) /gcloud/bigtable/_generated
3- DS_DIR =$(shell pwd) /gcloud/datastore/_generated
2+ BIGTABLE_DIR =$(shell pwd) /gcloud/bigtable/_generated
3+ DATASTORE_DIR =$(shell pwd) /gcloud/datastore/_generated
44GRPC_PLUGIN =grpc_python_plugin
55PROTOC_CMD =protoc
6- BT_PROTOS_DIR =$(shell pwd) /cloud-bigtable-client/bigtable-protos/src/main/proto
7- DS_PROTOS_DIR =$(shell pwd) /googleapis-pb
6+ BIGTABLE_PROTOS_DIR =$(shell pwd) /cloud-bigtable-client/bigtable-protos/src/main/proto
7+ GOOGLEAPIS_PROTOS_DIR =$(shell pwd) /googleapis-pb
88
99help :
1010 @echo ' Makefile for gcloud-python Bigtable protos '
@@ -23,49 +23,49 @@ generate:
2323 mkdir -p $(GENERATED_DIR )
2424 # Generate all *_pb2.py files that require gRPC.
2525 $(PROTOC_CMD ) \
26- --proto_path=$(BT_PROTOS_DIR ) \
26+ --proto_path=$(BIGTABLE_PROTOS_DIR ) \
2727 --python_out=$(GENERATED_DIR ) \
2828 --plugin=protoc-gen-grpc=$(GRPC_PLUGIN ) \
2929 --grpc_out=$(GENERATED_DIR ) \
30- $(BT_PROTOS_DIR ) /google/bigtable/v1/bigtable_service.proto \
31- $(BT_PROTOS_DIR ) /google/bigtable/admin/cluster/v1/bigtable_cluster_service.proto \
32- $(BT_PROTOS_DIR ) /google/bigtable/admin/table/v1/bigtable_table_service.proto
30+ $(BIGTABLE_PROTOS_DIR ) /google/bigtable/v1/bigtable_service.proto \
31+ $(BIGTABLE_PROTOS_DIR ) /google/bigtable/admin/cluster/v1/bigtable_cluster_service.proto \
32+ $(BIGTABLE_PROTOS_DIR ) /google/bigtable/admin/table/v1/bigtable_table_service.proto
3333 # Generate all *_pb2.py files that do not require gRPC.
3434 $(PROTOC_CMD ) \
35- --proto_path=$(BT_PROTOS_DIR ) \
36- --proto_path=$(DS_PROTOS_DIR ) \
35+ --proto_path=$(BIGTABLE_PROTOS_DIR ) \
36+ --proto_path=$(GOOGLEAPIS_PROTOS_DIR ) \
3737 --python_out=$(GENERATED_DIR ) \
38- $(BT_PROTOS_DIR ) /google/bigtable/v1/bigtable_data.proto \
39- $(BT_PROTOS_DIR ) /google/bigtable/v1/bigtable_service_messages.proto \
40- $(BT_PROTOS_DIR ) /google/bigtable/admin/cluster/v1/bigtable_cluster_data.proto \
41- $(BT_PROTOS_DIR ) /google/bigtable/admin/cluster/v1/bigtable_cluster_service_messages.proto \
42- $(BT_PROTOS_DIR ) /google/bigtable/admin/table/v1/bigtable_table_data.proto \
43- $(BT_PROTOS_DIR ) /google/bigtable/admin/table/v1/bigtable_table_service_messages.proto \
44- $(DS_PROTOS_DIR ) /google/datastore/v1beta3/datastore.proto \
45- $(DS_PROTOS_DIR ) /google/datastore/v1beta3/entity.proto \
46- $(DS_PROTOS_DIR ) /google/datastore/v1beta3/query.proto
38+ $(BIGTABLE_PROTOS_DIR ) /google/bigtable/v1/bigtable_data.proto \
39+ $(BIGTABLE_PROTOS_DIR ) /google/bigtable/v1/bigtable_service_messages.proto \
40+ $(BIGTABLE_PROTOS_DIR ) /google/bigtable/admin/cluster/v1/bigtable_cluster_data.proto \
41+ $(BIGTABLE_PROTOS_DIR ) /google/bigtable/admin/cluster/v1/bigtable_cluster_service_messages.proto \
42+ $(BIGTABLE_PROTOS_DIR ) /google/bigtable/admin/table/v1/bigtable_table_data.proto \
43+ $(BIGTABLE_PROTOS_DIR ) /google/bigtable/admin/table/v1/bigtable_table_service_messages.proto \
44+ $(GOOGLEAPIS_PROTOS_DIR ) /google/datastore/v1beta3/datastore.proto \
45+ $(GOOGLEAPIS_PROTOS_DIR ) /google/datastore/v1beta3/entity.proto \
46+ $(GOOGLEAPIS_PROTOS_DIR ) /google/datastore/v1beta3/query.proto
4747 # Move the newly generated *_pb2.py files into our library.
48- mv $(GENERATED_DIR ) /google/bigtable/v1/* $(BT_DIR )
49- mv $(GENERATED_DIR ) /google/bigtable/admin/cluster/v1/* $(BT_DIR )
50- mv $(GENERATED_DIR ) /google/bigtable/admin/table/v1/* $(BT_DIR )
51- mv $(GENERATED_DIR ) /google/datastore/v1beta3/* $(DS_DIR )
48+ mv $(GENERATED_DIR ) /google/bigtable/v1/* $(BIGTABLE_DIR )
49+ mv $(GENERATED_DIR ) /google/bigtable/admin/cluster/v1/* $(BIGTABLE_DIR )
50+ mv $(GENERATED_DIR ) /google/bigtable/admin/table/v1/* $(BIGTABLE_DIR )
51+ mv $(GENERATED_DIR ) /google/datastore/v1beta3/* $(DATASTORE_DIR )
5252 # Remove all existing *.proto files before we replace
53- rm -f $(BT_DIR ) /* .proto
54- rm -f $(DS_DIR ) /* .proto
53+ rm -f $(BIGTABLE_DIR ) /* .proto
54+ rm -f $(DATASTORE_DIR ) /* .proto
5555 # Copy over the *.proto files into our library.
56- cp $(BT_PROTOS_DIR ) /google/bigtable/v1/* .proto $(BT_DIR )
57- cp $(BT_PROTOS_DIR ) /google/bigtable/admin/cluster/v1/* .proto $(BT_DIR )
58- cp $(BT_PROTOS_DIR ) /google/bigtable/admin/table/v1/* .proto $(BT_DIR )
59- cp $(BT_PROTOS_DIR ) /google/longrunning/operations.proto $(BT_DIR )
60- cp $(DS_PROTOS_DIR ) /google/datastore/v1beta3/* .proto $(DS_DIR )
56+ cp $(BIGTABLE_PROTOS_DIR ) /google/bigtable/v1/* .proto $(BIGTABLE_DIR )
57+ cp $(BIGTABLE_PROTOS_DIR ) /google/bigtable/admin/cluster/v1/* .proto $(BIGTABLE_DIR )
58+ cp $(BIGTABLE_PROTOS_DIR ) /google/bigtable/admin/table/v1/* .proto $(BIGTABLE_DIR )
59+ cp $(BIGTABLE_PROTOS_DIR ) /google/longrunning/operations.proto $(BIGTABLE_DIR )
60+ cp $(GOOGLEAPIS_PROTOS_DIR ) /google/datastore/v1beta3/* .proto $(DATASTORE_DIR )
6161 # Rename all *.proto files in our library with an
6262 # underscore and remove executable bit.
63- cd $(BT_DIR ) && \
63+ cd $(BIGTABLE_DIR ) && \
6464 for filename in * .proto; do \
6565 chmod -x $$ filename ; \
6666 mv $$ filename _$$ filename ; \
6767 done
68- cd $(DS_DIR ) && \
68+ cd $(DATASTORE_DIR ) && \
6969 for filename in * .proto; do \
7070 chmod -x $$ filename ; \
7171 mv $$ filename _$$ filename ; \
0 commit comments