Skip to content
Snippets Groups Projects
Commit 146e374d authored by kpayson64's avatar kpayson64 Committed by GitHub
Browse files

Merge pull request #7768 from kpayson64/grpcio_tools35

Add Python3.5 grpcio-tools binaries for windows
parents 3bc78cd0 69ff5de4
No related branches found
No related tags found
No related merge requests found
...@@ -65,15 +65,20 @@ EXTRA_ENV_COMPILE_ARGS = os.environ.get('GRPC_PYTHON_CFLAGS', None) ...@@ -65,15 +65,20 @@ EXTRA_ENV_COMPILE_ARGS = os.environ.get('GRPC_PYTHON_CFLAGS', None)
EXTRA_ENV_LINK_ARGS = os.environ.get('GRPC_PYTHON_LDFLAGS', None) EXTRA_ENV_LINK_ARGS = os.environ.get('GRPC_PYTHON_LDFLAGS', None)
if EXTRA_ENV_COMPILE_ARGS is None: if EXTRA_ENV_COMPILE_ARGS is None:
EXTRA_ENV_COMPILE_ARGS = '-std=c++11' EXTRA_ENV_COMPILE_ARGS = '-std=c++11'
if 'win32' in sys.platform and sys.version_info < (3, 5): if 'win32' in sys.platform:
# We use define flags here and don't directly add to DEFINE_MACROS below to if sys.version_info < (3, 5):
# ensure that the expert user/builder has a way of turning it off (via the # We use define flags here and don't directly add to DEFINE_MACROS below to
# envvars) without adding yet more GRPC-specific envvars. # ensure that the expert user/builder has a way of turning it off (via the
# See https://sourceforge.net/p/mingw-w64/bugs/363/ # envvars) without adding yet more GRPC-specific envvars.
if '32' in platform.architecture()[0]: # See https://sourceforge.net/p/mingw-w64/bugs/363/
EXTRA_ENV_COMPILE_ARGS += ' -D_ftime=_ftime32 -D_timeb=__timeb32 -D_ftime_s=_ftime32_s' if '32' in platform.architecture()[0]:
EXTRA_ENV_COMPILE_ARGS += ' -D_ftime=_ftime32 -D_timeb=__timeb32 -D_ftime_s=_ftime32_s'
else:
EXTRA_ENV_COMPILE_ARGS += ' -D_ftime=_ftime64 -D_timeb=__timeb64'
else: else:
EXTRA_ENV_COMPILE_ARGS += ' -D_ftime=_ftime64 -D_timeb=__timeb64' # We need to statically link the C++ Runtime, only the C runtime is
# available dynamically
EXTRA_ENV_COMPILE_ARGS += ' /MT'
elif "linux" in sys.platform or "darwin" in sys.platform: elif "linux" in sys.platform or "darwin" in sys.platform:
EXTRA_ENV_COMPILE_ARGS += ' -fno-wrapv -frtti' EXTRA_ENV_COMPILE_ARGS += ' -fno-wrapv -frtti'
if EXTRA_ENV_LINK_ARGS is None: if EXTRA_ENV_LINK_ARGS is None:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment