From 63b0d11ca81b348dcf4463ff935ef326b4be7358 Mon Sep 17 00:00:00 2001
From: Ken Payson <kpayson@google.com>
Date: Mon, 17 Apr 2017 00:03:40 -0700
Subject: [PATCH] Final changes

---
 setup.py                      | 3 ++-
 src/python/grpcio/commands.py | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/setup.py b/setup.py
index 65c0a94a34..4cbd1a45a9 100644
--- a/setup.py
+++ b/setup.py
@@ -104,6 +104,7 @@ EXTRA_ENV_LINK_ARGS = os.environ.get('GRPC_PYTHON_LDFLAGS', None)
 if EXTRA_ENV_COMPILE_ARGS is None:
   EXTRA_ENV_COMPILE_ARGS = ''
   if 'win32' in sys.platform and sys.version_info < (3, 5):
+    EXTRA_ENV_COMPILE_ARGS += ' -std=c++11'
     # We use define flags here and don't directly add to DEFINE_MACROS below to
     # ensure that the expert user/builder has a way of turning it off (via the
     # envvars) without adding yet more GRPC-specific envvars.
@@ -113,7 +114,7 @@ if EXTRA_ENV_COMPILE_ARGS is None:
     else:
       EXTRA_ENV_COMPILE_ARGS += ' -D_ftime=_ftime64 -D_timeb=__timeb64'
   elif 'win32' in sys.platform:
-    EXTRA_ENV_COMPILE_ARGS += ' -D_PYTHON_MSVC -std=c++11'
+    EXTRA_ENV_COMPILE_ARGS += ' -D_PYTHON_MSVC'
   elif "linux" in sys.platform:
     EXTRA_ENV_COMPILE_ARGS += ' -std=c++11 -fvisibility=hidden -fno-wrapv'
   elif "darwin" in sys.platform:
diff --git a/src/python/grpcio/commands.py b/src/python/grpcio/commands.py
index 848b284f35..fa5620d7e9 100644
--- a/src/python/grpcio/commands.py
+++ b/src/python/grpcio/commands.py
@@ -267,7 +267,7 @@ class BuildExt(build_ext.build_ext):
 
     def build_extensions(self):
         if "darwin" in sys.platform:
-            config = os.environ.get('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))
-- 
GitLab