diff --git a/requirements.bazel.txt b/requirements.bazel.txt index 10b47550f99..09f161ab711 100644 --- a/requirements.bazel.txt +++ b/requirements.bazel.txt @@ -2,7 +2,7 @@ coverage>=4.0 cython>=0.29.8 enum34>=1.0.4 -protobuf>=3.5.0.post1 +protobuf>=3.5.0.post1, < 4.0dev six>=1.10 wheel>=0.29 futures>=2.2.0 diff --git a/requirements.txt b/requirements.txt index 27dd7d9f63b..00d91d3c13d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,6 +2,6 @@ coverage>=4.0 cython>=0.29.8 enum34>=1.0.4 -protobuf>=3.5.0.post1 +protobuf>=3.5.0.post1, < 4.0dev six>=1.10 wheel>=0.29 diff --git a/setup.py b/setup.py index 2379703eb7d..807d005899d 100644 --- a/setup.py +++ b/setup.py @@ -355,6 +355,9 @@ INSTALL_REQUIRES = ( "futures>=2.2.0; python_version<'3.2'", "enum34>=1.0.4; python_version<'3.4'", ) +EXTRAS_REQUIRES = { + 'protobuf': 'grpcio-tools>={version}'.format(version=grpc_version.VERSION), +} SETUP_REQUIRES = INSTALL_REQUIRES + ( 'Sphinx~=1.8.1', @@ -417,6 +420,7 @@ setuptools.setup( package_dir=PACKAGE_DIRECTORIES, package_data=PACKAGE_DATA, install_requires=INSTALL_REQUIRES, + extras_require=EXTRAS_REQUIRES, setup_requires=SETUP_REQUIRES, cmdclass=COMMAND_CLASS, ) diff --git a/tools/distrib/python/grpcio_tools/setup.py b/tools/distrib/python/grpcio_tools/setup.py index 90347b529ad..9cc024f87ee 100644 --- a/tools/distrib/python/grpcio_tools/setup.py +++ b/tools/distrib/python/grpcio_tools/setup.py @@ -219,7 +219,7 @@ setuptools.setup( ext_modules=extension_modules(), packages=setuptools.find_packages('.'), install_requires=[ - 'protobuf>=3.5.0.post1', + 'protobuf>=3.5.0.post1, < 4.0dev', 'grpcio>={version}'.format(version=grpc_version.VERSION), ], package_data=package_data(),