summaryrefslogtreecommitdiffstats
path: root/Lib/sysconfig.py
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2014-11-22 20:54:57 (GMT)
committerSteve Dower <steve.dower@microsoft.com>2014-11-22 20:54:57 (GMT)
commit65e4cb10d9d9964f30bc72561bf0e86833328a3b (patch)
tree1c9502ea790480e2ea06b380d912eeb879b2f96d /Lib/sysconfig.py
parent92716777b862af05bf149bd02cac4d83234751c4 (diff)
downloadcpython-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/sysconfig.py')
-rw-r--r--Lib/sysconfig.py17
1 files changed, 5 insertions, 12 deletions
diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
index dbf7767..c5f541b 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)