~ubuntu-branches/ubuntu/natty/python3.1/natty-security

« back to all changes in this revision

Viewing changes to Lib/distutils/msvc9compiler.py

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2010-07-06 16:52:42 UTC
  • mfrom: (1.2.1 upstream) (2.1.11 sid)
  • Revision ID: james.westby@ubuntu.com-20100706165242-2xv4i019r3et6c0j
Tags: 3.1.2+20100706-1ubuntu1
* Merge with Debian; remaining changes:
  - Regenerate the control file.
  - Add debian/patches/overwrite-semaphore-check for Lucid buildds.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
#   finding DevStudio (through the registry)
13
13
# ported to VS2005 and VS 2008 by Christian Heimes
14
14
 
15
 
__revision__ = "$Id: msvc9compiler.py 76995 2009-12-21 23:18:02Z tarek.ziade $"
 
15
__revision__ = "$Id: msvc9compiler.py 82133 2010-06-21 15:42:48Z benjamin.peterson $"
16
16
 
17
17
import os
18
18
import subprocess
38
38
         winreg.HKEY_LOCAL_MACHINE,
39
39
         winreg.HKEY_CLASSES_ROOT)
40
40
 
41
 
VS_BASE = r"Software\Microsoft\VisualStudio\%0.1f"
42
 
WINSDK_BASE = r"Software\Microsoft\Microsoft SDKs\Windows"
43
 
NET_BASE = r"Software\Microsoft\.NETFramework"
 
41
NATIVE_WIN64 = (sys.platform == 'win32' and sys.maxsize > 2**32)
 
42
if NATIVE_WIN64:
 
43
    # Visual C++ is a 32-bit application, so we need to look in
 
44
    # the corresponding registry branch, if we're running a
 
45
    # 64-bit Python on Win64
 
46
    VS_BASE = r"Software\Wow6432Node\Microsoft\VisualStudio\%0.1f"
 
47
    WINSDK_BASE = r"Software\Wow6432Node\Microsoft\Microsoft SDKs\Windows"
 
48
    NET_BASE = r"Software\Wow6432Node\Microsoft\.NETFramework"
 
49
else:
 
50
    VS_BASE = r"Software\Microsoft\VisualStudio\%0.1f"
 
51
    WINSDK_BASE = r"Software\Microsoft\Microsoft SDKs\Windows"
 
52
    NET_BASE = r"Software\Microsoft\.NETFramework"
44
53
 
45
54
# A map keyed by get_platform() return values to values accepted by
46
55
# 'vcvarsall.bat'.  Note a cross-compile may combine these (eg, 'x86_amd64' is