aboutsummaryrefslogtreecommitdiffhomepage
path: root/setup.py
diff options
context:
space:
mode:
authorGravatar Yuchen Zeng <zyc@google.com>2017-04-20 16:41:25 -0700
committerGravatar Yuchen Zeng <zyc@google.com>2017-04-20 17:19:59 -0700
commitb4d33e07a7f053b9420dae7b8e4de0372468bddf (patch)
treec38124bfaad63b7658dbed09b5d87300a5aa7c0d /setup.py
parent7432d748d7971944f4c57c900042d945f57b7098 (diff)
Disable c-ares for x64 windows python
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index e050646475..b1ac4f326e 100644
--- a/setup.py
+++ b/setup.py
@@ -141,6 +141,8 @@ CYTHON_EXTENSION_MODULE_NAMES = ('grpc._cython.cygrpc',)
CYTHON_HELPER_C_FILES = ()
CORE_C_FILES = tuple(grpc_core_dependencies.CORE_SOURCE_FILES)
+if "win32" in sys.platform and "64bit" in platform.architecture()[0]:
+ CORE_C_FILES = filter(lambda x: 'third_party/cares' not in x, CORE_C_FILES)
EXTENSION_INCLUDE_DIRECTORIES = (
(PYTHON_STEM,) + CORE_INCLUDE + BORINGSSL_INCLUDE + ZLIB_INCLUDE +
@@ -160,7 +162,9 @@ DEFINE_MACROS = (
if "win32" in sys.platform:
DEFINE_MACROS += (('WIN32_LEAN_AND_MEAN', 1), ('CARES_STATICLIB', 1),)
if '64bit' in platform.architecture()[0]:
- DEFINE_MACROS += (('MS_WIN64', 1),)
+ # TODO(zyc): Re-enble c-ares on x64 windows after fixing the
+ # ares_library_init compilation issue
+ DEFINE_MACROS += (('MS_WIN64', 1), ('GRPC_ARES', 0),)
elif sys.version_info >= (3, 5):
# For some reason, this is needed to get access to inet_pton/inet_ntop
# on msvc, but only for 32 bits