summaryrefslogtreecommitdiff
path: root/Lib
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2012-05-27 17:30:09 +0100
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2012-05-27 17:30:09 +0100
commit7e203498d1d90e943bc322b82a2e9a8e50da25c6 (patch)
tree40c6fd14cee307b195a991d638fd0620eda47efe /Lib
parent0b43bcf5287d9494e3332b391350fcd32fe93f2c (diff)
downloadcpython-git-7e203498d1d90e943bc322b82a2e9a8e50da25c6.tar.gz
Fixed _sys_home computation and added diagnostics for Windows buildbot failures.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/distutils/sysconfig.py2
-rw-r--r--Lib/sysconfig.py3
-rw-r--r--Lib/test/test_venv.py5
3 files changed, 8 insertions, 2 deletions
diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
index 59315f7279..e86cb23236 100644
--- a/Lib/distutils/sysconfig.py
+++ b/Lib/distutils/sysconfig.py
@@ -50,6 +50,8 @@ _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)
def _python_build():
if _sys_home:
return _is_python_source_dir(_sys_home)
diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
index 7350efbfa0..ac1e75107c 100644
--- a/Lib/sysconfig.py
+++ b/Lib/sysconfig.py
@@ -107,7 +107,8 @@ _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)
def is_python_build(check_home=False):
if check_home and _sys_home:
return _is_python_source_dir(_sys_home)
diff --git a/Lib/test/test_venv.py b/Lib/test/test_venv.py
index 8e41a47fd0..2f2558f3f6 100644
--- a/Lib/test/test_venv.py
+++ b/Lib/test/test_venv.py
@@ -76,7 +76,10 @@ class BasicTest(BaseTest):
data = self.get_text_file_contents(self.bindir, self.ps3name)
self.assertTrue(data.startswith('#!%s%s' % (self.env_dir, os.sep)))
fn = self.get_env_file(self.bindir, self.exe)
- self.assertTrue(os.path.exists(fn), 'File %r exists' % fn)
+ if not os.path.exists(fn): # diagnostics for Windows buildbot failures
+ print('Contents of %r:' % self.bindir)
+ print(' %r' % os.listdir(self.bindir))
+ self.assertTrue(os.path.exists(fn), 'File %r should exist.' % fn)
def test_overwrite_existing(self):
"""