aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/python/grpcio_health_checking/setup.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/python/grpcio_health_checking/setup.py')
-rw-r--r--src/python/grpcio_health_checking/setup.py20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/python/grpcio_health_checking/setup.py b/src/python/grpcio_health_checking/setup.py
index 01d796f4e6..c105f57509 100644
--- a/src/python/grpcio_health_checking/setup.py
+++ b/src/python/grpcio_health_checking/setup.py
@@ -56,21 +56,12 @@ PACKAGE_DIRECTORIES = {
'': '.',
}
-INSTALL_REQUIRES = ('protobuf>=3.3.0',
+INSTALL_REQUIRES = ('protobuf>=3.5.0.post1',
'grpcio>={version}'.format(version=grpc_version.VERSION),)
try:
- # ensure we can load the _pb2_grpc module:
- from grpc_health.v1 import health_pb2_grpc as _pb2_grpc
- # if we can find the _pb2_grpc module, the package has already been built.
- SETUP_REQUIRES = ()
- COMMAND_CLASS = {
- # wire up commands to no-op not to break the external dependencies
- 'preprocess': _NoOpCommand,
- 'build_package_protos': _NoOpCommand,
- }
-except ImportError: # we are in the build environment
import health_commands as _health_commands
+ # we are in the build environment, otherwise the above import fails
SETUP_REQUIRES = (
'grpcio-tools=={version}'.format(version=grpc_version.VERSION),)
COMMAND_CLASS = {
@@ -78,6 +69,13 @@ except ImportError: # we are in the build environment
'preprocess': _health_commands.CopyProtoModules,
'build_package_protos': _health_commands.BuildPackageProtos,
}
+except ImportError:
+ SETUP_REQUIRES = ()
+ COMMAND_CLASS = {
+ # wire up commands to no-op not to break the external dependencies
+ 'preprocess': _NoOpCommand,
+ 'build_package_protos': _NoOpCommand,
+ }
setuptools.setup(
name='grpcio-health-checking',