aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Duarte <licorne@google.com>2021-11-08 14:19:37 +0000
committerDavid Duarte <licorne@google.com>2021-11-08 14:19:37 +0000
commit6e7447ca74ccd2fc2b716c2619f3fe91475581c7 (patch)
tree10119cc0d18e9f679ef03e95471355d7497a7ddb
parent41ea55d6aa26a778b606cb85a69f80d2421a3fd3 (diff)
downloadmmi2grpc-6e7447ca74ccd2fc2b716c2619f3fe91475581c7.tar.gz
setup.py: Add grpc_tools proto include path
Change-Id: I577f6fbd7ea4ec204927baed7ca20570aaab8e0d
-rwxr-xr-xsetup.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index 47618ca..8e54d32 100755
--- a/setup.py
+++ b/setup.py
@@ -1,6 +1,7 @@
#!/usr/bin/env python3
from setuptools import setup, Command
from setuptools.command.build_py import build_py
+import pkg_resources
import os
package_directory = os.path.dirname(os.path.realpath(__file__))
@@ -22,9 +23,12 @@ class BuildGrpc(Command):
def run(self):
from grpc_tools import protoc
+ proto_include = pkg_resources.resource_filename('grpc_tools', '_proto')
+
protoc.main([
'grpc_tools.protoc',
- '-I=proto',
+ '-Iproto',
+ f'-I{proto_include}',
'--python_out=.',
'--custom_grpc_out=.',
'blueberry/host.proto',