[pypy-commit] pypy msvc14: ignore VS140COMNTOOLS environment variable in order to set up the SDK toolkit

mattip pypy.commits at gmail.com
Mon Feb 12 14:27:01 EST 2018


Author: Matti Picus <matti.picus at gmail.com>
Branch: msvc14
Changeset: r93809:c62a256a0910
Date: 2018-02-11 22:49 -0500
http://bitbucket.org/pypy/pypy/changeset/c62a256a0910/

Log:	ignore VS140COMNTOOLS environment variable in order to set up the
	SDK toolkit (grafted from 5a84b83fffbe222d785d642a521b4f99f4173965)

diff --git a/rpython/translator/platform/windows.py b/rpython/translator/platform/windows.py
--- a/rpython/translator/platform/windows.py
+++ b/rpython/translator/platform/windows.py
@@ -55,7 +55,10 @@
     vcdict = None
     toolsdir = None
     try:
-        toolsdir = os.environ['VS%sCOMNTOOLS' % vsver]
+        if vsver < 140:
+            toolsdir = os.environ['VS%sCOMNTOOLS' % vsver]
+        else:
+            raise KeyError('always use registry values')
     except KeyError:
         # use setuptools from python3 to find tools
         try:


More information about the pypy-commit mailing list