diff options
author | Ken Payson <kpayson@google.com> | 2016-06-23 12:32:07 -0700 |
---|---|---|
committer | Ken Payson <kpayson@google.com> | 2016-06-23 12:32:07 -0700 |
commit | fe754b4e996415300ff29b6e4c378d3d5704852a (patch) | |
tree | 34801614e38e60ccb2543a3ad60015212b6d9eb8 /setup.py | |
parent | d605b63383678313aaf3a6a3be7d8f9fc7ca67e9 (diff) |
Use GRPC_PYTHON_CFLAGS/GRPC_PYTHON_LDFLAGS in setup.py.
This is needed for building grpcio with mingw, see
https://github.com/grpc/grpc/pull/7012.
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -31,6 +31,7 @@ import os import os.path +import shlex import shutil import sys import sysconfig @@ -99,8 +100,9 @@ if not "win32" in sys.platform: DEFINE_MACROS = (('OPENSSL_NO_ASM', 1), ('_WIN32_WINNT', 0x600), ('GPR_BACKWARDS_COMPATIBILITY_MODE', 1),) -LDFLAGS = () -CFLAGS = () +LDFLAGS = shlex.split(os.environ.get('GRPC_PYTHON_LDFLAGS', '')) +CFLAGS = shlex.split(os.environ.get('GRPC_PYTHON_CFLAGS', '')) + if "linux" in sys.platform: LDFLAGS += ('-Wl,-wrap,memcpy',) if "linux" in sys.platform or "darwin" in sys.platform: |