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.
--- 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