aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Ken Payson <kpayson@google.com>2017-04-14 16:34:26 -0700
committerGravatar Ken Payson <kpayson@google.com>2017-04-14 16:34:26 -0700
commitae5ca1b44770dd8cb0df74e91915e71116fa75ab (patch)
tree234c631a5b7e2059300bb2dd387e9ca4f4014416
parent5b034e6a4f574d9bc2d6f2bfb1f3d3a75785bc43 (diff)
Fixes
-rw-r--r--setup.py4
-rw-r--r--src/python/grpcio/commands.py4
2 files changed, 2 insertions, 6 deletions
diff --git a/setup.py b/setup.py
index 412e072e5b..65c0a94a34 100644
--- a/setup.py
+++ b/setup.py
@@ -194,9 +194,7 @@ def cython_extensions_and_necessity():
cython_module_files = [os.path.join(PYTHON_STEM,
name.replace('.', '/') + '.pyx')
for name in CYTHON_EXTENSION_MODULE_NAMES]
- config = os.environ['CONFIG']
- if config is None:
- config = 'opt'
+ config = os.environ.get('CONFIG', 'opt')
prefix = 'libs/' + config + '/'
if "darwin" in sys.platform:
extra_objects = [prefix + 'libares.a',
diff --git a/src/python/grpcio/commands.py b/src/python/grpcio/commands.py
index 7db5de63b2..848b284f35 100644
--- a/src/python/grpcio/commands.py
+++ b/src/python/grpcio/commands.py
@@ -267,9 +267,7 @@ class BuildExt(build_ext.build_ext):
def build_extensions(self):
if "darwin" in sys.platform:
- config = os.environ['CONFIG']
- if config is None:
- config = 'opt'
+ config = os.environ.get('CONFIG', opt)
target_path = os.path.abspath(
os.path.join(os.path.dirname(os.path.realpath(__file__)),
'..', '..', '..', 'libs', config))