setup: print subprocess stderr if there is any
authorBryan O'Sullivan <bryano@fb.com>
Tue, 13 Nov 2012 09:55:26 -0800
changeset 17926 65a46635fb31
parent 17925 2631b3576a33
child 17927 9796d5437e72
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.
setup.py
--- 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