From e6d5b7f59b367ad024a1432ad6101866d202b247 Mon Sep 17 00:00:00 2001 From: Leonard de Ruijter Date: Thu, 31 Oct 2019 08:06:57 +0100 Subject: [PATCH 1/2] Use setuptools' monkeypatching when getting supported compiler to build wx --- build.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.py b/build.py index 217be07c..73cc01b6 100755 --- a/build.py +++ b/build.py @@ -763,7 +763,7 @@ def checkCompiler(quiet=False): # Make sure that the compiler that Python wants to use can be found. # It will terminate if the compiler is not found or other exceptions # are raised. - cmd = "import distutils.msvc9compiler as msvc; " \ + cmd = "import setuptools, distutils.msvc9compiler as msvc; " \ "mc = msvc.MSVCCompiler(); " \ "mc.initialize(); " \ "print(mc.cc)" @@ -774,7 +774,7 @@ def checkCompiler(quiet=False): # Now get the environment variables which that compiler needs from # its vcvarsall.bat command and load them into this process's # environment. - cmd = "import distutils.msvc9compiler as msvc; " \ + cmd = "import setuptools, distutils.msvc9compiler as msvc; " \ "arch = msvc.PLAT_TO_VCVARS[msvc.get_platform()]; " \ "env = msvc.query_vcvarsall(msvc.VERSION, arch); " \ "print(env)" From 5755ca2ce6a78c81a7d1488a1adda3dbbd982c79 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Thu, 31 Oct 2019 16:48:37 -0700 Subject: [PATCH 2/2] Import setuptools in wscript too --- wscript | 1 + 1 file changed, 1 insertion(+) diff --git a/wscript b/wscript index 983fcc83..66910fef 100644 --- a/wscript +++ b/wscript @@ -9,6 +9,7 @@ import sys import os +import setuptools try: from textwrap import indent