From dfd8164efe215df67bbc301b3983e0f92c626afb Mon Sep 17 00:00:00 2001
From: Nehal J Wani <nehaljw.kkd1@gmail.com>
Date: Thu, 8 Mar 2018 00:58:59 -0600
Subject: [PATCH 2/2] MacOSX: Specify correct SDK path and version

---
 buildtools/build_wxwidgets.py | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/buildtools/build_wxwidgets.py b/buildtools/build_wxwidgets.py
index a54aea6..a7698e1 100644
--- a/buildtools/build_wxwidgets.py
+++ b/buildtools/build_wxwidgets.py
@@ -302,16 +302,8 @@ def main(wxDir, args):
         # version present on the build machine.
         # TODO: should there be a command line option to set the SDK?
         if sys.platform.startswith("darwin"):
-            wxpy_configure_opts.append("--with-macosx-version-min=10.6")
-            for xcodePath in getXcodePaths():
-                sdks = [ xcodePath+"/SDKs/MacOSX10.{}.sdk".format(n)
-                         for n in range(6, 15) ]
-                # use the lowest available sdk on the build machine
-                for sdk in sdks:
-                    if os.path.exists(sdk):
-                        wxpy_configure_opts.append(
-                            "--with-macosx-sdk=%s" % sdk)
-                        break
+            wxpy_configure_opts.append("--with-macosx-version-min=10.9")
+            wxpy_configure_opts.append("--with-macosx-sdk={}".format(os.environ.get('CONDA_BUILD_SYSROOT')))
 
         if not options.mac_framework:
             if installDir and not prefixDir:
-- 
1.9.5 (Apple Git-50.3)

