changeset 17926:65a46635fb31

setup: print subprocess stderr if there is any I just spent 1.5 days trying to debug a failing buildbot because setup.py was silently dropping the errors that were being printed by in-place hg.
author Bryan O'Sullivan <bryano@fb.com>
date Tue, 13 Nov 2012 09:55:26 -0800
parents 2631b3576a33
children 9796d5437e72
files setup.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/setup.py	Sat Nov 10 11:37:41 2012 -0800
+++ b/setup.py	Tue Nov 13 09:55:26 2012 -0800
@@ -151,6 +151,8 @@
            if not e.startswith(b('Not trusting file')) \
               and not e.startswith(b('warning: Not importing'))]
     if err:
+        print >> sys.stderr, "stderr from '%s':" % (' '.join(cmd))
+        print >> sys.stderr, '\n'.join(['  ' + e for e in err])
         return ''
     return out