diff options
author | Steve Dower <steve.dower@microsoft.com> | 2014-11-22 20:54:57 (GMT) |
---|---|---|
committer | Steve Dower <steve.dower@microsoft.com> | 2014-11-22 20:54:57 (GMT) |
commit | 65e4cb10d9d9964f30bc72561bf0e86833328a3b (patch) | |
tree | 1c9502ea790480e2ea06b380d912eeb879b2f96d /Lib/distutils | |
parent | 92716777b862af05bf149bd02cac4d83234751c4 (diff) | |
download | cpython-65e4cb10d9d9964f30bc72561bf0e86833328a3b.zip cpython-65e4cb10d9d9964f30bc72561bf0e86833328a3b.tar.gz cpython-65e4cb10d9d9964f30bc72561bf0e86833328a3b.tar.bz2 |
Issue #22919: Windows build updated to support VC 14.0 (Visual Studio 2015), which will be used for the official 3.5 release.
Diffstat (limited to 'Lib/distutils')
-rw-r--r-- | Lib/distutils/command/build_ext.py | 2 | ||||
-rw-r--r-- | Lib/distutils/command/wininst-14.0-amd64.exe | bin | 0 -> 84480 bytes | |||
-rw-r--r-- | Lib/distutils/command/wininst-14.0.exe | bin | 0 -> 75264 bytes | |||
-rw-r--r-- | Lib/distutils/msvc9compiler.py | 3 | ||||
-rw-r--r-- | Lib/distutils/msvccompiler.py | 3 | ||||
-rw-r--r-- | Lib/distutils/sysconfig.py | 27 |
6 files changed, 16 insertions, 19 deletions
diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py index 54ce134..605efbd 100644 --- a/Lib/distutils/command/build_ext.py +++ b/Lib/distutils/command/build_ext.py @@ -209,7 +209,7 @@ class build_ext(Command): if MSVC_VERSION >= 9: # Use the .lib files for the correct architecture if self.plat_name == 'win32': - suffix = '' + suffix = 'win32' else: # win-amd64 or win-ia64 suffix = self.plat_name[4:] diff --git a/Lib/distutils/command/wininst-14.0-amd64.exe b/Lib/distutils/command/wininst-14.0-amd64.exe Binary files differnew file mode 100644 index 0000000..9affe13 --- /dev/null +++ b/Lib/distutils/command/wininst-14.0-amd64.exe diff --git a/Lib/distutils/command/wininst-14.0.exe b/Lib/distutils/command/wininst-14.0.exe Binary files differnew file mode 100644 index 0000000..3ce71b9 --- /dev/null +++ b/Lib/distutils/command/wininst-14.0.exe diff --git a/Lib/distutils/msvc9compiler.py b/Lib/distutils/msvc9compiler.py index 9688f20..d1374ef 100644 --- a/Lib/distutils/msvc9compiler.py +++ b/Lib/distutils/msvc9compiler.py @@ -179,6 +179,9 @@ def get_build_version(): i = i + len(prefix) s, rest = sys.version[i:].split(" ", 1) majorVersion = int(s[:-2]) - 6 + if majorVersion >= 13: + # v13 was skipped and should be v14 + majorVersion += 1 minorVersion = int(s[2:3]) / 10.0 # I don't think paths are affected by minor version in version 6 if majorVersion == 6: diff --git a/Lib/distutils/msvccompiler.py b/Lib/distutils/msvccompiler.py index 8116656..1048cd4 100644 --- a/Lib/distutils/msvccompiler.py +++ b/Lib/distutils/msvccompiler.py @@ -157,6 +157,9 @@ def get_build_version(): i = i + len(prefix) s, rest = sys.version[i:].split(" ", 1) majorVersion = int(s[:-2]) - 6 + if majorVersion >= 13: + # v13 was skipped and should be v14 + majorVersion += 1 minorVersion = int(s[2:3]) / 10.0 # I don't think paths are affected by minor version in version 6 if majorVersion == 6: diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py index a1452fe..573724d 100644 --- a/Lib/distutils/sysconfig.py +++ b/Lib/distutils/sysconfig.py @@ -9,6 +9,7 @@ Written by: Fred L. Drake, Jr. Email: <fdrake@acm.org> """ +import _imp import os import re import sys @@ -22,23 +23,15 @@ BASE_PREFIX = os.path.normpath(sys.base_prefix) BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix) # Path to the base directory of the project. On Windows the binary may -# live in project/PCBuild9. If we're dealing with an x64 Windows build, -# it'll live in project/PCbuild/amd64. +# live in project/PCBuild/win32 or project/PCBuild/amd64. # set for cross builds if "_PYTHON_PROJECT_BASE" in os.environ: project_base = os.path.abspath(os.environ["_PYTHON_PROJECT_BASE"]) else: project_base = os.path.dirname(os.path.abspath(sys.executable)) -if os.name == "nt" and "pcbuild" in project_base[-8:].lower(): - project_base = os.path.abspath(os.path.join(project_base, os.path.pardir)) -# PC/VS7.1 -if os.name == "nt" and "\\pc\\v" in project_base[-10:].lower(): - project_base = os.path.abspath(os.path.join(project_base, os.path.pardir, - os.path.pardir)) -# PC/AMD64 -if os.name == "nt" and "\\pcbuild\\amd64" in project_base[-14:].lower(): - project_base = os.path.abspath(os.path.join(project_base, os.path.pardir, - os.path.pardir)) +if (os.name == 'nt' and + project_base.lower().endswith(('\\pcbuild\\win32', '\\pcbuild\\amd64'))): + project_base = os.path.dirname(os.path.dirname(project_base)) # python_build: (Boolean) if true, we're either building Python or # building an extension with an un-installed Python, so we use @@ -51,11 +44,9 @@ def _is_python_source_dir(d): return True return False _sys_home = getattr(sys, '_home', None) -if _sys_home and os.name == 'nt' and \ - _sys_home.lower().endswith(('pcbuild', 'pcbuild\\amd64')): - _sys_home = os.path.dirname(_sys_home) - if _sys_home.endswith('pcbuild'): # must be amd64 - _sys_home = os.path.dirname(_sys_home) +if (_sys_home and os.name == 'nt' and + _sys_home.lower().endswith(('\\pcbuild\\win32', '\\pcbuild\\amd64'))): + _sys_home = os.path.dirname(os.path.dirname(_sys_home)) def _python_build(): if _sys_home: return _is_python_source_dir(_sys_home) @@ -468,7 +459,7 @@ def _init_nt(): # XXX hmmm.. a normal install puts include files here g['INCLUDEPY'] = get_python_inc(plat_specific=0) - g['EXT_SUFFIX'] = '.pyd' + g['EXT_SUFFIX'] = _imp.extension_suffixes()[0] g['EXE'] = ".exe" g['VERSION'] = get_python_version().replace(".", "") g['BINDIR'] = os.path.dirname(os.path.abspath(sys.executable)) |