Skip to content

Commit

Permalink
Update docs for setting verbose/quite in config file or env var
Browse files Browse the repository at this point in the history
  • Loading branch information
McSinyx committed Jul 15, 2020
1 parent c8fa87c commit 41f0bc2
Showing 1 changed file with 19 additions and 10 deletions.
29 changes: 19 additions & 10 deletions docs/html/user_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,15 @@ and ``--no-cache-dir``, falsy values have to be used:
no-compile = no
no-warn-script-location = false
For options which can be repeated like ``--verbose`` and ``--quite``,
a nonnegative integer could be used to represent the level to be specified:

.. code-block:: ini
[global]
quite = 0
verbose = 2
It is possible to append values to a section within a configuration file such as the pip.ini file.
This is applicable to appending options like ``--find-links`` or ``--trusted-host``,
which can be written on multiple lines:
Expand Down Expand Up @@ -469,20 +478,20 @@ pip's command line options can be set with environment variables using the
format ``PIP_<UPPER_LONG_NAME>`` . Dashes (``-``) have to be replaced with
underscores (``_``).

For example, to set the default timeout::

export PIP_DEFAULT_TIMEOUT=60

This is the same as passing the option to pip directly::
For example, setting ``PIP_DEFAULT_TIMEOUT`` to 60 has the same effect as
passing the option to pip directly::

pip --default-timeout=60 [...]

For command line options which can be repeated, use a space to separate
multiple values. For example::

export PIP_FIND_LINKS="http://mirror1.example.com http://mirror2.example.com"
For command line options which can be repeated, if they do not take any argument
like ``--quite`` or ``--verbose``, use a nonnegative integer to represent
the number of repeatition, for instance setting ``PIP_VERBOSE`` to 3 is
equivalent to calling pip with ``-vvv``.

is the same as calling::
Fruitful repeatable options however, can be specified via environment variable
as a space-separated list. For example having ``PIP_FIND_LINKS`` set to
``"http://mirror1.example.com http://mirror2.example.com"`` is the same as
calling ::

pip install --find-links=http://mirror1.example.com --find-links=http://mirror2.example.com

Expand Down

0 comments on commit 41f0bc2

Please sign in to comment.