diff --git a/docs/config.rst b/docs/config.rst index 31e963316..a455766ee 100644 --- a/docs/config.rst +++ b/docs/config.rst @@ -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: @@ -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