Unverified Commit 5487d8ca authored by Jisi Liu's avatar Jisi Liu Committed by GitHub

Merge pull request #4380 from mateuszmatejczyk/patch-1

Output *_pb2_grpc.py files when use_grpc_plugin=True
parents 47875190 294b5758
...@@ -45,8 +45,11 @@ def _CcSrcs(srcs, use_grpc_plugin=False): ...@@ -45,8 +45,11 @@ def _CcSrcs(srcs, use_grpc_plugin=False):
def _CcOuts(srcs, use_grpc_plugin=False): def _CcOuts(srcs, use_grpc_plugin=False):
return _CcHdrs(srcs, use_grpc_plugin) + _CcSrcs(srcs, use_grpc_plugin) return _CcHdrs(srcs, use_grpc_plugin) + _CcSrcs(srcs, use_grpc_plugin)
def _PyOuts(srcs): def _PyOuts(srcs, use_grpc_plugin=False):
return [s[:-len(".proto")] + "_pb2.py" for s in srcs] ret = [s[:-len(".proto")] + "_pb2.py" for s in srcs]
if use_grpc_plugin:
ret += [s[:-len(".proto")] + "_pb2_grpc.py" for s in srcs]
return ret
def _RelativeOutputPath(path, include, dest=""): def _RelativeOutputPath(path, include, dest=""):
if include == None: if include == None:
...@@ -344,7 +347,7 @@ def py_proto_library( ...@@ -344,7 +347,7 @@ def py_proto_library(
**kargs: other keyword arguments that are passed to cc_library. **kargs: other keyword arguments that are passed to cc_library.
""" """
outs = _PyOuts(srcs) outs = _PyOuts(srcs, use_grpc_plugin)
includes = [] includes = []
if include != None: if include != None:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment