summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2010-06-21 15:42:48 (GMT)
committerBenjamin Peterson <benjamin@python.org>2010-06-21 15:42:48 (GMT)
commit08cde2d0b1f99146aed1bf71f2227153bf18dde6 (patch)
treed44a3c65fa2f99caaec0be489ab74254767a36a6
parent2c8253856f78d652d64b9c57b8af53c5dd979f11 (diff)
downloadcpython-08cde2d0b1f99146aed1bf71f2227153bf18dde6.zip
cpython-08cde2d0b1f99146aed1bf71f2227153bf18dde6.tar.gz
cpython-08cde2d0b1f99146aed1bf71f2227153bf18dde6.tar.bz2
Merged revisions 82131 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r82131 | benjamin.peterson | 2010-06-21 10:37:16 -0500 (Mon, 21 Jun 2010) | 9 lines Merged revisions 82130 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r82130 | benjamin.peterson | 2010-06-21 10:27:46 -0500 (Mon, 21 Jun 2010) | 1 line fix finding visual studio 2008 on 64 bit #8854 ........ ................
-rw-r--r--Lib/distutils/msvc9compiler.py15
-rw-r--r--Misc/NEWS2
2 files changed, 14 insertions, 3 deletions
diff --git a/Lib/distutils/msvc9compiler.py b/Lib/distutils/msvc9compiler.py
index ad021b5..761b9ca 100644
--- a/Lib/distutils/msvc9compiler.py
+++ b/Lib/distutils/msvc9compiler.py
@@ -38,9 +38,18 @@ HKEYS = (winreg.HKEY_USERS,
winreg.HKEY_LOCAL_MACHINE,
winreg.HKEY_CLASSES_ROOT)
-VS_BASE = r"Software\Microsoft\VisualStudio\%0.1f"
-WINSDK_BASE = r"Software\Microsoft\Microsoft SDKs\Windows"
-NET_BASE = r"Software\Microsoft\.NETFramework"
+NATIVE_WIN64 = (sys.platform == 'win32' and sys.maxsize > 2**32)
+if NATIVE_WIN64:
+ # Visual C++ is a 32-bit application, so we need to look in
+ # the corresponding registry branch, if we're running a
+ # 64-bit Python on Win64
+ VS_BASE = r"Software\Wow6432Node\Microsoft\VisualStudio\%0.1f"
+ WINSDK_BASE = r"Software\Wow6432Node\Microsoft\Microsoft SDKs\Windows"
+ NET_BASE = r"Software\Wow6432Node\Microsoft\.NETFramework"
+else:
+ VS_BASE = r"Software\Microsoft\VisualStudio\%0.1f"
+ WINSDK_BASE = r"Software\Microsoft\Microsoft SDKs\Windows"
+ NET_BASE = r"Software\Microsoft\.NETFramework"
# A map keyed by get_platform() return values to values accepted by
# 'vcvarsall.bat'. Note a cross-compile may combine these (eg, 'x86_amd64' is
diff --git a/Misc/NEWS b/Misc/NEWS
index 1f08e6e..4464e62 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -778,6 +778,8 @@ C-API
Build
-----
+- Issue #8854: Fix finding Visual Studio 2008 on Windows x64.
+
- Issue #3920, #7903: Define _BSD_SOURCE on OpenBSD 4.4 through 4.9.
- Issue #7632: When Py_USING_MEMORY_DEBUGGER is defined, disable the