Skip to content

Commit 0af5700

Browse files
committed
also pass PIP_INDEX_URL because it's likely that the user wants to use
it with the pip commands that run inside the tox run.
1 parent d54913e commit 0af5700

File tree

5 files changed

+9
-8
lines changed

5 files changed

+9
-8
lines changed

CHANGELOG

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
-----------
33

44
- (new) introduce environment variable isolation:
5-
tox now only passes the PATH variable from the tox
5+
tox now only passes the PATH and PIP_INDEX_URL variable from the tox
66
invocation environment to the test environment and on Windows
77
also ``SYSTEMROOT``, ``PATHEXT``, ``TEMP`` and ``TMP`` whereas
8-
on linux additionally ``TMPDIR`` is passed. If you need to pass
8+
on unix additionally ``TMPDIR`` is passed. If you need to pass
99
through further environment variables you can use the new ``passenv`` setting,
1010
a space-separated list of environment variable names. Each name
1111
can make use of fnmatch-style glob patterns. All environment

doc/announce/release-2.0.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ Holger Krekel, merlinux GmbH
5555
-----------
5656

5757
- (new) introduce environment variable isolation:
58-
tox now only passes the PATH variable from the tox
58+
tox now only passes the PATH and PIP_INDEX_URL variable from the tox
5959
invocation environment to the test environment and on Windows
6060
also ``SYSTEMROOT``, ``PATHEXT``, ``TEMP`` and ``TMP`` whereas
61-
on linux additionally ``TMPDIR`` is passed. If you need to pass
61+
on unix additionally ``TMPDIR`` is passed. If you need to pass
6262
through further environment variables you can use the new ``passenv`` setting,
6363
a space-separated list of environment variable names. Each name
6464
can make use of fnmatch-style glob patterns. All environment
@@ -109,4 +109,3 @@ Holger Krekel, merlinux GmbH
109109
experimental plugin hooks, use tox internals at your own risk.
110110

111111
- DEPRECATE distshare in documentation
112-

doc/config.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,9 @@ Complete list of settings that you can put into ``testenv*`` sections:
199199
invocation environment it is ignored. You can use ``*`` and ``?`` to
200200
match multiple environment variables with one name.
201201

202-
Note that the ``PATH`` variable is unconditionally passed down and on
203-
Windows ``SYSTEMROOT`` and ``PATHEXT`` will be passed down as well.
202+
Note that the ``PATH`` and ``PIP_INDEX_URL`` variables are unconditionally
203+
passed down and on Windows ``SYSTEMROOT``, ``PATHEXT``, ``TEMP`` and ``TMP``
204+
will be passed down as well whereas on unix ``TMPDIR`` will be passed down.
204205
You can override these variables with the ``setenv`` option.
205206

206207
.. confval:: recreate=True|False(default)

tests/test_config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -715,6 +715,7 @@ def test_passenv(self, tmpdir, newconfig, monkeypatch, plat):
715715
else:
716716
assert "TMPDIR" in envconfig.passenv
717717
assert "PATH" in envconfig.passenv
718+
assert "PIP_INDEX_URL" in envconfig.passenv
718719
assert "A123A" in envconfig.passenv
719720
assert "A123B" in envconfig.passenv
720721

tox/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ def setenv(testenv_config, value):
387387
help="list of X=Y lines with environment variable settings")
388388

389389
def passenv(testenv_config, value):
390-
passenv = set(["PATH"])
390+
passenv = set(["PATH", "PIP_INDEX_URL"])
391391

392392
# we ensure that tmp directory settings are passed on
393393
# we could also set it to the per-venv "envtmpdir"

0 commit comments

Comments
 (0)