Skip to content

Instantly share code, notes, and snippets.

@alexeypa
Created July 28, 2016 14:42
Show Gist options
  • Save alexeypa/058d81c20b4dbb84b98f263d04c17c2e to your computer and use it in GitHub Desktop.
Save alexeypa/058d81c20b4dbb84b98f263d04c17c2e to your computer and use it in GitHub Desktop.
--- msvccompiler.py 2007-08-28 23:01:28.843750000 -0700
+++ msvccompiler_patched.py 2007-08-28 23:01:10.078125000 -0700
@@ -240,7 +240,8 @@
# x86
if self.__version >= 7:
self.__root = r"Software\Microsoft\VisualStudio"
- self.__macros = MacroExpander(self.__version)
+ if not (os.environ.has_key("DISTUTILS_USE_SDK") and os.environ.has_key("MSSdk") and self.find_exe("cl.exe")):
+ self.__macros = MacroExpander(self.__version)
else:
self.__root = r"Software\Microsoft\Devstudio"
self.__product = "Visual Studio version %s" % self.__version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment