35 lines
1.1 KiB
Diff
35 lines
1.1 KiB
Diff
|
diff -Naur grpc-1.26.0-original/src/python/grpcio_tests/setup.py grpc-1.26.0/src/python/grpcio_tests/setup.py
|
||
|
--- grpc-1.26.0-original/src/python/grpcio_tests/setup.py 2019-12-17 20:29:27.000000000 -0500
|
||
|
+++ grpc-1.26.0/src/python/grpcio_tests/setup.py 2021-02-02 10:12:54.881753347 -0500
|
||
|
@@ -19,7 +19,12 @@
|
||
|
|
||
|
import setuptools
|
||
|
|
||
|
-import grpc_tools.command
|
||
|
+try:
|
||
|
+ from grpc_tools.command import BuildPackageProtos
|
||
|
+except ImportError:
|
||
|
+ if not os.environ.get('GRPCIO_TESTS_IGNORE_MISSING_TOOLS'):
|
||
|
+ raise
|
||
|
+ BuildPackageProtos = None
|
||
|
|
||
|
PY3 = sys.version_info.major == 3
|
||
|
|
||
|
@@ -52,7 +57,6 @@
|
||
|
COMMAND_CLASS = {
|
||
|
# Run `preprocess` *before* doing any packaging!
|
||
|
'preprocess': commands.GatherProto,
|
||
|
- 'build_package_protos': grpc_tools.command.BuildPackageProtos,
|
||
|
'build_py': commands.BuildPy,
|
||
|
'run_fork': commands.RunFork,
|
||
|
'run_interop': commands.RunInterop,
|
||
|
@@ -60,6 +64,8 @@
|
||
|
'test_gevent': commands.TestGevent,
|
||
|
'test_aio': commands.TestAio,
|
||
|
}
|
||
|
+if BuildPackageProtos is not None:
|
||
|
+ COMMAND_CLASS['build_package_protos'] = BuildPackageProtos
|
||
|
|
||
|
PACKAGE_DATA = {
|
||
|
'tests.interop': [
|