Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 31b16a5

Browse files
committed
Merged revisions 82130 via svnmerge from
svn+ssh://[email protected]/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 ........
1 parent 75f94c2 commit 31b16a5

2 files changed

Lines changed: 14 additions & 3 deletions

File tree

Lib/distutils/msvc9compiler.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,18 @@
3737
winreg.HKEY_LOCAL_MACHINE,
3838
winreg.HKEY_CLASSES_ROOT)
3939

40-
VS_BASE = r"Software\Microsoft\VisualStudio\%0.1f"
41-
WINSDK_BASE = r"Software\Microsoft\Microsoft SDKs\Windows"
42-
NET_BASE = r"Software\Microsoft\.NETFramework"
40+
NATIVE_WIN64 = (sys.platform == 'win32' and sys.maxsize > 2**32)
41+
if NATIVE_WIN64:
42+
# Visual C++ is a 32-bit application, so we need to look in
43+
# the corresponding registry branch, if we're running a
44+
# 64-bit Python on Win64
45+
VS_BASE = r"Software\Wow6432Node\Microsoft\VisualStudio\%0.1f"
46+
WINSDK_BASE = r"Software\Wow6432Node\Microsoft\Microsoft SDKs\Windows"
47+
NET_BASE = r"Software\Wow6432Node\Microsoft\.NETFramework"
48+
else:
49+
VS_BASE = r"Software\Microsoft\VisualStudio\%0.1f"
50+
WINSDK_BASE = r"Software\Microsoft\Microsoft SDKs\Windows"
51+
NET_BASE = r"Software\Microsoft\.NETFramework"
4352

4453
# A map keyed by get_platform() return values to values accepted by
4554
# 'vcvarsall.bat'. Note a cross-compile may combine these (eg, 'x86_amd64' is

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1441,6 +1441,8 @@ Extension Modules
14411441
Build
14421442
-----
14431443

1444+
- Issue #8854: Fix finding Visual Studio 2008 on Windows x64.
1445+
14441446
- Issue #1759169, #8864: Drop _XOPEN_SOURCE on Solaris, define it for
14451447
multiprocessing only.
14461448

0 commit comments

Comments
 (0)