aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@users.noreply.github.com>2016-06-23 15:23:31 -0700
committerGravatar GitHub <noreply@github.com>2016-06-23 15:23:31 -0700
commit894eac559f6f02ec8853d00f74d1c9474646d3ab (patch)
tree8e6af9e0c62b8c0ed17617876d669987693db482
parentd4a299c4556c9810026856a4eee2312674e7c19f (diff)
parentfe754b4e996415300ff29b6e4c378d3d5704852a (diff)
Merge pull request #7021 from kpayson64/python_setup_env
Use GRPC_PYTHON_CFLAGS/GRPC_PYTHON_LDFLAGS in setup.py.
-rw-r--r--setup.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/setup.py b/setup.py
index f73501b8b3..7e625b937a 100644
--- a/setup.py
+++ b/setup.py
@@ -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: