aboutsummaryrefslogtreecommitdiffhomepage
path: root/setup.py
diff options
context:
space:
mode:
authorGravatar Lidi Zheng <scallopsky@gmail.com>2018-11-06 17:08:12 -0800
committerGravatar GitHub <noreply@github.com>2018-11-06 17:08:12 -0800
commit201342c91a626e860e0b97d159ed17a25f445223 (patch)
tree15e24b7d6a1587f522bf938e72e993ca653d74d5 /setup.py
parent88150dbe2cc8251b2b2cc7152d0364a3a54cad53 (diff)
parent0baadc7289d9355121ada8b9cffc96a16b458081 (diff)
Merge pull request #16916 from benjaminp/disable-compat
Allow gpr compatibility mode to be disabled in the Python build.
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/setup.py b/setup.py
index 066e2c5ba0..7ac766c8c2 100644
--- a/setup.py
+++ b/setup.py
@@ -105,6 +105,10 @@ BUILD_WITH_SYSTEM_ZLIB = os.environ.get('GRPC_PYTHON_BUILD_SYSTEM_ZLIB',
BUILD_WITH_SYSTEM_CARES = os.environ.get('GRPC_PYTHON_BUILD_SYSTEM_CARES',
False)
+# If this environmental variable is set, GRPC will not try to be compatible with
+# libc versions old than the one it was compiled against.
+DISABLE_LIBC_COMPATIBILITY = os.environ.get('GRPC_PYTHON_DISABLE_LIBC_COMPATIBILITY', False)
+
# Environment variable to determine whether or not to enable coverage analysis
# in Cython modules.
ENABLE_CYTHON_TRACING = os.environ.get(
@@ -200,9 +204,9 @@ if BUILD_WITH_SYSTEM_ZLIB:
if BUILD_WITH_SYSTEM_CARES:
EXTENSION_LIBRARIES += ('cares',)
-DEFINE_MACROS = (
- ('OPENSSL_NO_ASM', 1), ('_WIN32_WINNT', 0x600),
- ('GPR_BACKWARDS_COMPATIBILITY_MODE', 1))
+DEFINE_MACROS = (('OPENSSL_NO_ASM', 1), ('_WIN32_WINNT', 0x600))
+if not DISABLE_LIBC_COMPATIBILITY:
+ DEFINE_MACROS += (('GPR_BACKWARDS_COMPATIBILITY_MODE', 1),)
if "win32" in sys.platform:
# TODO(zyc): Re-enable c-ares on x64 and x86 windows after fixing the
# ares_library_init compilation issue