Skip to content

Commit

Permalink
fix setenv usages in documentation examples
Browse files Browse the repository at this point in the history
fixes #1999

Co-authored-by: Jürgen Gmach <juergen.gmach@googlemail.com>
  • Loading branch information
AndreyNautilus and jugmac00 committed Apr 11, 2021
1 parent 8d6a324 commit 5368be6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
2 changes: 2 additions & 0 deletions docs/changelog/1999.doc.rst
@@ -0,0 +1,2 @@
Update examples in the documentation to use ``setenv`` in the ``[testenv]`` sections, not wrongly in the ``[tox]`` main section.
- by :user:`AndreyNautilus`
16 changes: 10 additions & 6 deletions docs/example/basic.rst
Expand Up @@ -172,15 +172,15 @@ This variable can be also set in ``tox.ini``:

.. code-block:: ini
[tox]
[testenv]
setenv =
PIP_INDEX_URL = https://pypi.my-alternative-index.org
Alternatively, a configuration where ``PIP_INDEX_URL`` could be overriden from environment:

.. code-block:: ini
[tox]
[testenv]
setenv =
PIP_INDEX_URL = {env:PIP_INDEX_URL:https://pypi.my-alternative-index.org}
Expand All @@ -192,21 +192,25 @@ multiple PyPI servers, using ``PIP_EXTRA_INDEX_URL`` environment variable:

.. code-block:: ini
[tox]
[testenv]
setenv =
PIP_EXTRA_INDEX_URL = https://mypypiserver.org
[testenv]
deps =
# docutils will be installed directly from PyPI
docutils
# mypackage missing at PyPI will be installed from custom PyPI URL
mypackage
This configuration will install ``docutils`` from the default
Python PYPI server and will install the ``mypackage`` from
Python PyPI server and will install the ``mypackage`` from
our index server at ``https://mypypiserver.org`` URL.

.. warning::

Using an extra PyPI index for installing private packages may cause security issues.
For example, if ``mypackage`` is registered with the default PyPI index, pip will install ``mypackage``
from the default PyPI index, not from the custom one.

Further customizing installation
---------------------------------

Expand Down

0 comments on commit 5368be6

Please sign in to comment.