diff options
author | Steve Dower <steve.dower@microsoft.com> | 2014-11-22 12:54:57 -0800 |
---|---|---|
committer | Steve Dower <steve.dower@microsoft.com> | 2014-11-22 12:54:57 -0800 |
commit | 65e4cb10d9d9964f30bc72561bf0e86833328a3b (patch) | |
tree | 1c9502ea790480e2ea06b380d912eeb879b2f96d /Lib/sysconfig.py | |
parent | Stop using a deprecated unittest.TestCase method. (diff) | |
download | cpython-65e4cb10d9d9964f30bc72561bf0e86833328a3b.tar.gz cpython-65e4cb10d9d9964f30bc72561bf0e86833328a3b.tar.bz2 cpython-65e4cb10d9d9964f30bc72561bf0e86833328a3b.zip |
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/sysconfig.py')
-rw-r--r-- | Lib/sysconfig.py | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py index dbf77672054..c5f541b3d55 100644 --- a/Lib/sysconfig.py +++ b/Lib/sysconfig.py @@ -109,13 +109,8 @@ else: # unable to retrieve the real program name _PROJECT_BASE = _safe_realpath(os.getcwd()) -if os.name == "nt" and "pcbuild" in _PROJECT_BASE[-8:].lower(): - _PROJECT_BASE = _safe_realpath(os.path.join(_PROJECT_BASE, pardir)) -# PC/VS7.1 -if os.name == "nt" and "\\pc\\v" in _PROJECT_BASE[-10:].lower(): - _PROJECT_BASE = _safe_realpath(os.path.join(_PROJECT_BASE, pardir, pardir)) -# PC/AMD64 -if os.name == "nt" and "\\pcbuild\\amd64" in _PROJECT_BASE[-14:].lower(): +if (os.name == 'nt' and + _PROJECT_BASE.lower().endswith(('\\pcbuild\\win32', '\\pcbuild\\amd64'))): _PROJECT_BASE = _safe_realpath(os.path.join(_PROJECT_BASE, pardir, pardir)) # set for cross builds @@ -129,11 +124,9 @@ def _is_python_source_dir(d): 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 is_python_build(check_home=False): if check_home and _sys_home: return _is_python_source_dir(_sys_home) |