Modernize run_codegen script

pull/24455/head
Richard Belleville 5 years ago
parent 85738c0da8
commit 7821040586
  1. 17
      examples/python/route_guide/run_codegen.sh

@ -1,3 +1,5 @@
#!/bin/bash
# Copyright 2015 gRPC authors. # Copyright 2015 gRPC authors.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
@ -11,14 +13,11 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
"""Runs protoc with the gRPC plugin to generate messages and gRPC stubs."""
from grpc_tools import protoc # Runs protoc with the gRPC plugin to generate messages and gRPC stubs
protoc.main(( python3 -m grpc_tools.protoc \
'', -I ../../protos \
'-I../../protos', --python_out=. \
'--python_out=.', --grpc_python_out=. \
'--grpc_python_out=.', ../../protos/route_guide.proto
'../../protos/route_guide.proto',
))
Loading…
Cancel
Save