From 741383783369e52c93703721bf2940b5113e1aab Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Mon, 16 May 2022 22:37:02 -0700 Subject: [PATCH] Since we've already set everything we need in the environment set DISTUTILS_USE_SDK so distutils won't try to do it all again. --- buildtools/config.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/buildtools/config.py b/buildtools/config.py index d421f5fa..4482ba9d 100644 --- a/buildtools/config.py +++ b/buildtools/config.py @@ -1011,6 +1011,11 @@ def getMSVCInfo(PYTHON, arch, set_env=False): os.environ['LIB'] = info.lib os.environ['LIBPATH'] = info.libpath + # We already have everything we need, tell distutils to not go hunting + # for it all again if it happens to be called. + os.environ['DISTUTILS_USE_SDK'] = "1" + os.environ['MSSdk'] = "1" + MSVCinfo = info return info