summaryrefslogtreecommitdiffstats
path: root/Lib/distutils
diff options
context:
space:
mode:
authorTarek Ziadé <ziade.tarek@gmail.com>2010-03-06 02:17:28 (GMT)
committerTarek Ziadé <ziade.tarek@gmail.com>2010-03-06 02:17:28 (GMT)
commitc49b6efbca22929b9afc25de98c31aae3728cf8a (patch)
tree0f10a2afdab13b7b421ae6d9a096ba3c29200ff4 /Lib/distutils
parent5501e6a7da371a851478a939d974ecebbc84e2dd (diff)
downloadcpython-c49b6efbca22929b9afc25de98c31aae3728cf8a.zip
cpython-c49b6efbca22929b9afc25de98c31aae3728cf8a.tar.gz
cpython-c49b6efbca22929b9afc25de98c31aae3728cf8a.tar.bz2
search in the alternative location for VCExpress
Diffstat (limited to 'Lib/distutils')
-rw-r--r--Lib/distutils/msvc9compiler.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/Lib/distutils/msvc9compiler.py b/Lib/distutils/msvc9compiler.py
index 41d67fa..932b6ea 100644
--- a/Lib/distutils/msvc9compiler.py
+++ b/Lib/distutils/msvc9compiler.py
@@ -38,6 +38,7 @@ HKEYS = (_winreg.HKEY_USERS,
_winreg.HKEY_CLASSES_ROOT)
VS_BASE = r"Software\Microsoft\VisualStudio\%0.1f"
+VSEXPRESS_BASE = r"Software\Microsoft\VCExpress\%0.1f"
WINSDK_BASE = r"Software\Microsoft\Microsoft SDKs\Windows"
NET_BASE = r"Software\Microsoft\.NETFramework"
@@ -216,9 +217,18 @@ def find_vcvarsall(version):
productdir = Reg.get_value(r"%s\Setup\VC" % vsbase,
"productdir")
except KeyError:
- log.debug("Unable to find productdir in registry")
productdir = None
+ # trying Express edition
+ if productdir is None:
+ vsbase = VSEXPRESS_BASE % version
+ try:
+ productdir = Reg.get_value(r"%s\Setup\VC" % vsbase,
+ "productdir")
+ except KeyError:
+ productdir = None
+ log.debug("Unable to find productdir in registry")
+
if not productdir or not os.path.isdir(productdir):
toolskey = "VS%0.f0COMNTOOLS" % version
toolsdir = os.environ.get(toolskey, None)