From 1eb0f5aad704c07de45e5092dde04c8051e421ae Mon Sep 17 00:00:00 2001
From: Robin Dunn <robin@alldunn.com>
Date: Sat, 5 May 2018 21:03:30 -0700
Subject: [PATCH 1/2] Update waf to version 2.0.7

---
 build.py | 4 ++--
 wscript  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/build.py b/build.py
index 41ed39ac..a56d3e22 100755
--- a/build.py
+++ b/build.py
@@ -83,8 +83,8 @@ sipMD5 = {
     'linux64'  : 'b349127a4d46452936e4181d96b12c2d',
 }
 
-wafCurrentVersion = '1.7.15-p1'
-wafMD5 = 'e44003373c965f4221bbdc4c9b846128'
+wafCurrentVersion = '2.0.7'
+wafMD5 = '48ac1250bcccd0674cf461937875ce9a'
 
 doxygenCurrentVersion = '1.8.8'
 doxygenMD5 = {
diff --git a/wscript b/wscript
index d051ebbc..c4bc96fd 100644
--- a/wscript
+++ b/wscript
@@ -30,7 +30,7 @@ def options(opt):
     if isWindows:
         opt.load('msvc')
     else:
-        opt.load('compiler_cc compiler_cxx')
+        opt.load('compiler_c compiler_cxx')
     opt.load('python')
 
     opt.add_option('--debug', dest='debug', action='store_true', default=False,
@@ -78,7 +78,7 @@ def configure(conf):
         conf.env['MSVC_TARGETS'] = [conf.options.msvc_arch]
         conf.load('msvc')
     else:
-        conf.load('compiler_cc compiler_cxx')
+        conf.load('compiler_c compiler_cxx')
 
     if conf.options.python:
         conf.env.PYTHON = conf.options.python
-- 
2.18.0


From bbcd9a029d42b5c66e122676bcdc8d7149415388 Mon Sep 17 00:00:00 2001
From: Eli Schwartz <eschwartz@archlinux.org>
Date: Thu, 26 Jul 2018 19:33:31 +0000
Subject: [PATCH 2/2] Manually backport update waf to 2.0.8

- e0cde8741295d08b599f39f33a2a95eef5fd5b87
- b910acaef120cce61508fc57eab07bb0286a29ec
- e1679ca2016a5160e12513e0c3c2d37030e431af
---
 build.py | 4 ++--
 wscript  | 8 ++++++++
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/build.py b/build.py
index a56d3e22..67aa813d 100755
--- a/build.py
+++ b/build.py
@@ -83,8 +83,8 @@ sipMD5 = {
     'linux64'  : 'b349127a4d46452936e4181d96b12c2d',
 }
 
-wafCurrentVersion = '2.0.7'
-wafMD5 = '48ac1250bcccd0674cf461937875ce9a'
+wafCurrentVersion = '2.0.8'
+wafMD5 = 'bc393f29337cd00aef25d54280ca22e1'
 
 doxygenCurrentVersion = '1.8.8'
 doxygenMD5 = {
diff --git a/wscript b/wscript
index c4bc96fd..388749e8 100644
--- a/wscript
+++ b/wscript
@@ -286,6 +286,14 @@ def configure(conf):
         for key in flags:
             _cleanFlags(conf, key)
 
+        # Waf 2 is now calling pythonX.Y-config for fetching libs and flags,
+        # and it may be outputting flags that will cause an explicit link to
+        # Python's lib, which we don't want as that could tie us to that
+        # specific Python instance instead of the one that is loading the
+        # wxPython extension modules. That's okay for PYEMBED but not for PYEXT
+        # configs.  
+        conf.env.LIBPATH_PYEXT = []
+        conf.env.LIB_PYEXT = []
 
         # Use the same compilers that wxWidgets used
         if cfg.CC:
-- 
2.18.0