-
Notifications
You must be signed in to change notification settings - Fork 3.1k
install: Less output on success; once on failure #2487
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
install: Less output on success; once on failure #2487
Conversation
Only show the details for a failed step, I like it! |
This broke something, not quite sure what. But I like the change. |
I think I know why this broke Python 3. Let me see if I can fix. |
This fixes 2 aspects of `pip install output`: 1. When `pip install` succeeds, it's still printing a lot of output from the package's setup.py. The average consumer of Python packages, when they do `pip install lxml`, probably doesn't care to see a bunch of output about: - copying files to a `build` directory - installing and running Cython - compiling C code This is noise to most when the `pip install` succeeds. It's useful to see all the output when the install fails, which is the subject of pypa#2 below. On success, the output is now very clean with 5 short lines: $ pip install lxml Collecting lxml Using cached lxml-3.4.2.tar.gz Installing collected packages: lxml Running setup.py install for lxml Successfully installed lxml-3.4.2 2. When there's an error from `pip install`, it's annoying to have to scroll through 2 different copies of the failure output (especially when one is filtered and one is unfiltered so one might have stuff that the other doesn't). This makes it not print the filtered version so that there is just the unfiltered version and nothing is repeated. $ pip install ~/dev/git-repos/lxml Processing /Users/marca/dev/git-repos/lxml Installing collected packages: lxml Running setup.py install for lxml Complete output from command ... cc -c /var/folders/gw/w0clrs515zx9x_55zgtpv4mm0000gp/T/xmlCheckVersion4tBaVV.c -o var/folders/gw/w0clrs515zx9x_55zgtpv4mm0000gp/T/xmlCheckVersion4tBaVV.o /var/folders/gw/w0clrs515zx9x_55zgtpv4mm0000gp/T/xmlCheckVersion4tBaVV.c:1:10: fatal error: 'libxml/xmlversion.h' file not found #include "libxml/xmlversion.h" ^ 1 error generated. ---------------------------------------- Command "/Users/marca/python/virtualenvs/pip/bin/python -c ... None of the lines above are repeated.
a934b35
to
c1d21e3
Compare
OK, I fixed the test failures. |
…_and_failure install: Less output on success; once on failure
Awesome! I've long been bugged by the verbosity of pip, but I've always just lived with it. Turns out it wasn't super hard to fix. |
changelog! |
For posterity, to set a good example for future contributions, changelog was added in #2490 |
Thank you! |
This fixes 2 aspects of
pip install output
:When
pip install
succeeds, it's still printing a lot of output from the package'ssetup.py
. The average consumer of Python packages, when they dopip install lxml
, probably doesn't care to see a bunch of output about:build
directoryThis is noise to most when the
pip install
succeeds. It's useful to see all the output when the install fails, which is the subject of pip install -r requirements.txt doesn't know when package installation fails during native compilation #2 below. On success, the output is now very clean with 5 short lines:When there's an error from
pip install
, it's annoying to have to scroll through 2 different copies of the failure output (especially when one is filtered and one is unfiltered so one might have stuff that the other doesn't). This makes it not print the filtered version so that there is just the unfiltered version and nothing is repeated.None of the lines above are repeated.
Cc: @sudarkoff, @aconrad