Skip to content
Snippets Groups Projects
Commit b3724c4b authored by Masood Malekghassemi's avatar Masood Malekghassemi Committed by GitHub
Browse files

Merge pull request #8612 from soltanmm-google/wacket

Include proto WKTs in py tools distutils command
parents d9190bd5 0858d214
No related branches found
No related tags found
No related merge requests found
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import os import os
import pkg_resources
import sys import sys
import setuptools import setuptools
...@@ -43,10 +44,14 @@ def build_package_protos(package_root): ...@@ -43,10 +44,14 @@ def build_package_protos(package_root):
if filename.endswith('.proto'): if filename.endswith('.proto'):
proto_files.append(os.path.abspath(os.path.join(root, filename))) proto_files.append(os.path.abspath(os.path.join(root, filename)))
well_known_protos_include = pkg_resources.resource_filename(
'grpc.tools', '_proto')
for proto_file in proto_files: for proto_file in proto_files:
command = [ command = [
'grpc.tools.protoc', 'grpc.tools.protoc',
'--proto_path={}'.format(inclusion_root), '--proto_path={}'.format(inclusion_root),
'--proto_path={}'.format(well_known_protos_include),
'--python_out={}'.format(inclusion_root), '--python_out={}'.format(inclusion_root),
'--grpc_python_out={}'.format(inclusion_root), '--grpc_python_out={}'.format(inclusion_root),
] + [proto_file] ] + [proto_file]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment