Skip to content

Commit

Permalink
Document how to replace deprecated indexserver configuration directiv…
Browse files Browse the repository at this point in the history
…e. (tox-dev#1976)

Co-authored-by: Gasper Zejn <zelo.zejn@gmail.com>
  • Loading branch information
zejn and Gasper Zejn committed Mar 27, 2021
1 parent 7aa1303 commit 5e9a697
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions docs/config.rst
Expand Up @@ -537,9 +537,11 @@ Complete list of settings that you can put into ``testenv*`` sections:

.. versionadded:: 0.9

(DEPRECATED, will be removed in a future version) Multi-line ``name =
URL`` definitions of python package servers. Dependencies can
specify using a specified index server through the
(DEPRECATED, will be removed in a future version) Use :conf:`setenv`
to configure PIP_INDEX_URL environment variable, see below.

Multi-line ``name = URL`` definitions of python package servers.
You can specify an alternative index server for dependencies by applying the
``:indexservername:depname`` pattern. The ``default`` indexserver
definition determines where unscoped dependencies and the sdist install
installs from. Example:
Expand All @@ -553,6 +555,17 @@ Complete list of settings that you can put into ``testenv*`` sections:
will make tox install all dependencies from this PyPI index server
(including when installing the project sdist package).

The recommended way to set a custom index server URL is to use :conf:`setenv`:

.. code-block:: ini
[testenv]
setenv =
PIP_INDEX_URL = {env:PIP_INDEX_URL:https://pypi.org/simple/}
This will ensure the desired index server gets used for virtual environment
creation and allow overriding the index server URL with an environment variable.

.. conf:: envdir ^ PATH ^ {toxworkdir}/{envname}

.. versionadded:: 1.5
Expand Down

0 comments on commit 5e9a697

Please sign in to comment.