1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00
Commit graph

8 commits

Author SHA1 Message Date
Nathaniel J. Smith af675e7797 Make install --quiet really quiet
Commit 5bb989993 added some code for hiding/showing the cursor when
running on the terminal, but accidentally made it so that it always
printed the invisible control codes, even when not on a tty or when
--quiet was specified. This turns out to be surprisingly bad (e.g. it
breaks the official docker python builds). So, let's not do that.

Fixes gh-3418
2016-02-01 14:59:06 -08:00
Nathaniel J. Smith 5bb9899938 Display spinner during long setup.py calls
One of the downsides of pip's new hiding of build chatter is that for
packages that take a very long time to build (e.g. scipy) the user gets
no indication that anything is happening for a very long time (e.g. tens
of minutes), and is likely to get frustrated and hit Control-C. This can
also create issues for automated systems that kill jobs that don't
produce occasional output (e.g. Travis-CI).

This commit implements an idea discussed here:

  https://github.com/pypa/pip/issues/2732#issuecomment-153215371

where we put up a spinner that rotates whenever the underlying build
produces output. I tried it on scipy, and it the experience was quite
pleasant! It spun around, sometimes fast and sometimes slow, and then
there was one uncomfortable pause for ~1 minute while a very gnarly C++
file got compiled, but that's okay because it was actually providing
accurate feedback.

It looks like:
```
  Running setup.py install for scipy ... /
  Running setup.py install for scipy ... -
  Running setup.py install for scipy ... \
  Running setup.py install for scipy ... done
```
or if the command has non-zero return code, or an exception is raised,
you get:
```
  Running setup.py install for scipy ... /
  Running setup.py install for scipy ... -
  Running setup.py install for scipy ... \
  Running setup.py install for scipy ... error
```
2015-11-05 23:28:03 -08:00
Piet Delport 44eb9854cc Add a progress bar mixin that cleans up after keyboard interrupts.
This is similar to the progress library's existing SigIntMixin, but it
avoids several problems with that implementation.
2015-03-01 02:52:37 +02:00
Paul Moore c5c550c09c Fix behaviour of not hiding the cursor on Windows 2015-01-16 14:14:21 +00:00
Donald Stufft 6e55324cd7 Detect if a nicer progress bar can be used, and use it if so
Conflicts:
	pip/utils/ui.py
2014-12-29 09:28:39 -05:00
Donald Stufft fada9e66d8 Fix progress bar since Windows doesn't support ANSI escape codes
* Use the colorama module to enable the "clear the line" ANSI escape
  code on Windows.
* Disable cursor hiding on Windows since Windows terminal doesn't
  support it nor does colorama.
2014-12-28 18:19:14 -05:00
Paul Moore 5ed05b4dcb Prevent zero division error in download speed calculation 2014-09-29 19:52:16 +01:00
Donald Stufft 767d11e49c Switch to using the stdlib logger instead of pip.log 2014-09-10 09:36:09 -04:00