4 new commits in tox:
https://bitbucket.org/hpk42/tox/commits/7c15500c3883/
Changeset: 7c15500c3883
User: hpk42
Date: 2015-05-12 17:57:41+00:00
Summary: refine docs
Affected #: 5 files
diff -r 6fc03c1208fd310cd38a013e8fff7330dc10f6c3 -r
7c15500c388337c46627a22668ed3d12a3df412b README.rst
--- a/README.rst
+++ b/README.rst
@@ -21,5 +21,5 @@
have fun,
-holger krekel, 2014
+holger krekel, 2015
diff -r 6fc03c1208fd310cd38a013e8fff7330dc10f6c3 -r
7c15500c388337c46627a22668ed3d12a3df412b doc/index.txt
--- a/doc/index.txt
+++ b/doc/index.txt
@@ -65,8 +65,7 @@
* :doc:`(new in 2.0) plugin system <plugins>` to modify tox execution with
simple hooks.
-* uses pip_ and setuptools_ by default. Experimental
- support for configuring the installer command
+* uses pip_ and setuptools_ by default. Support for configuring the installer
command
through :confval:`install_command=ARGV`.
* **cross-Python compatible**: CPython-2.6, 2.7, 3.2 and higher,
diff -r 6fc03c1208fd310cd38a013e8fff7330dc10f6c3 -r
7c15500c388337c46627a22668ed3d12a3df412b doc/plugins.txt
--- a/doc/plugins.txt
+++ b/doc/plugins.txt
@@ -6,8 +6,9 @@
.. versionadded:: 2.0
With tox-2.0 a few aspects of tox running can be experimentally modified
-by writing hook functions. We expect the list of hook function to grow
-over time.
+by writing hook functions. The list of of available hook function is
+to grow over time on a per-need basis.
+
writing a setuptools entrypoints plugin
---------------------------------------
@@ -30,19 +31,23 @@
install_requires=['tox>=2.0'],
)
-You can then install the plugin to develop it via::
+If installed, the ``entry_points`` part will make tox see and integrate
+your plugin during startup.
+
+You can install the plugin for development ("in-place") via::
pip install -e .
-and later publish it.
+and later publish it via something like::
-The ``entry_points`` part allows tox to see your plugin during startup.
+ python setup.py sdist register upload
Writing hook implementations
----------------------------
-A plugin module needs can define one or more hook implementation functions::
+A plugin module defines one or more hook implementation functions
+by decorating them with tox's ``hookimpl`` marker::
from tox import hookimpl
@@ -65,5 +70,9 @@
----------------------------
.. automodule:: tox.hookspecs
+
+.. autoclass:: tox.config.Parser
:members:
+.. autoclass:: tox.config.Config
+ :members:
diff -r 6fc03c1208fd310cd38a013e8fff7330dc10f6c3 -r
7c15500c388337c46627a22668ed3d12a3df412b tox/config.py
--- a/tox/config.py
+++ b/tox/config.py
@@ -38,29 +38,48 @@
return pm
-class MyParser:
+class Parser:
+ """ command line and ini-parser control object. """
+
def __init__(self):
self.argparser = argparse.ArgumentParser(
description="tox options", add_help=False)
self._testenv_attr = []
def add_argument(self, *args, **kwargs):
+ """ add argument to command line parser. This takes the
+ same arguments that ``argparse.ArgumentParser.add_argument``.
+ """
return self.argparser.add_argument(*args, **kwargs)
def add_testenv_attribute(self, name, type, help, default=None,
postprocess=None):
+ """ add an ini-file variable for "testenv" section.
+
+ Types are specified as strings like "bool", "line-list", "string",
"argv", "path",
+ "argvlist". The ``postprocess`` function will be called for each
testenv
+ like ``postprocess(config=config, reader=reader,
section_val=section_val)``
+ where ``section_val`` is the value as read from the ini (or the
default value).
+ Any postprocess function must return a value which will then become the
+ eventual value in the testenv section.
+ """
self._testenv_attr.append(VenvAttribute(name, type, default, help,
postprocess))
def add_testenv_attribute_obj(self, obj):
+ """ add an ini-file variable as an object.
+
+ This works as ``add_testenv_attribute`` but expects "name", "type",
"help",
+ and "postprocess" attributes on the object.
+ """
assert hasattr(obj, "name")
assert hasattr(obj, "type")
assert hasattr(obj, "help")
assert hasattr(obj, "postprocess")
self._testenv_attr.append(obj)
- def parse_args(self, args):
+ def _parse_args(self, args):
return self.argparser.parse_args(args)
- def format_help(self):
+ def _format_help(self):
return self.argparser.format_help()
@@ -168,11 +187,11 @@
args = sys.argv[1:]
# prepare command line options
- parser = MyParser()
+ parser = Parser()
pm.hook.tox_addoption(parser=parser)
# parse command line options
- option = parser.parse_args(args)
+ option = parser._parse_args(args)
interpreters = tox.interpreters.Interpreters(hook=pm.hook)
config = Config(pluginmanager=pm, option=option, interpreters=interpreters)
config._parser = parser
@@ -440,10 +459,12 @@
class Config(object):
def __init__(self, pluginmanager, option, interpreters):
+ #: dictionary containing envname to envconfig mappings
self.envconfigs = {}
self.invocationcwd = py.path.local()
self.interpreters = interpreters
self.pluginmanager = pluginmanager
+ #: option namespace containing all parsed command line options
self.option = option
@property
diff -r 6fc03c1208fd310cd38a013e8fff7330dc10f6c3 -r
7c15500c388337c46627a22668ed3d12a3df412b tox/session.py
--- a/tox/session.py
+++ b/tox/session.py
@@ -44,7 +44,7 @@
def show_help(config):
tw = py.io.TerminalWriter()
- tw.write(config._parser.format_help())
+ tw.write(config._parser._format_help())
tw.line()
https://bitbucket.org/hpk42/tox/commits/6813a1058194/
Changeset: 6813a1058194
User: hpk42
Date: 2015-05-12 19:25:22+00:00
Summary: rename some API that is reachable by hooks
Affected #: 6 files
diff -r 7c15500c388337c46627a22668ed3d12a3df412b -r
6813a10581945910d6197a67b672d07276c6e2e0 CHANGELOG
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -4,13 +4,17 @@
- (new) introduce environment variable isolation:
tox now only passes the PATH variable from the tox
invocation environment to the test environment and on Windows
- also ``SYSTEMROOT`` and ``PATHEXT``. If you need to pass through further
- environment variables you can use the new ``passenv`` setting,
+ also ``SYSTEMROOT``, ``PATHEXT``, ``TEMP`` and ``TMP`` whereas
+ on linux additionally ``TMPDIR`` is passed. If you need to pass
+ through further environment variables you can use the new ``passenv``
setting,
a space-separated list of environment variable names. Each name
can make use of fnmatch-style glob patterns. All environment
variables which exist in the tox-invocation environment will be copied
to the test environment.
+- a new ``--help-ini`` option shows all possible testenv settings and
+ their defaults.
+
- (new) introduce a way to specify on which platform a testenvironment is to
execute: the new per-venv "platform" setting allows to specify
a regular expression which is matched against sys.platform.
diff -r 7c15500c388337c46627a22668ed3d12a3df412b -r
6813a10581945910d6197a67b672d07276c6e2e0 doc/announce/release-2.0.txt
--- a/doc/announce/release-2.0.txt
+++ b/doc/announce/release-2.0.txt
@@ -51,20 +51,23 @@
best,
Holger Krekel, merlinux GmbH
-
2.0.0
-----------
- (new) introduce environment variable isolation:
tox now only passes the PATH variable from the tox
invocation environment to the test environment and on Windows
- also ``SYSTEMROOT`` and ``PATHEXT``. If you need to pass through further
- environment variables you can use the new ``passenv`` setting,
+ also ``SYSTEMROOT``, ``PATHEXT``, ``TEMP`` and ``TMP`` whereas
+ on linux additionally ``TMPDIR`` is passed. If you need to pass
+ through further environment variables you can use the new ``passenv``
setting,
a space-separated list of environment variable names. Each name
can make use of fnmatch-style glob patterns. All environment
variables which exist in the tox-invocation environment will be copied
to the test environment.
+- a new ``--help-ini`` option shows all possible testenv settings and
+ their defaults.
+
- (new) introduce a way to specify on which platform a testenvironment is to
execute: the new per-venv "platform" setting allows to specify
a regular expression which is matched against sys.platform.
@@ -107,5 +110,3 @@
- DEPRECATE distshare in documentation
-
-
diff -r 7c15500c388337c46627a22668ed3d12a3df412b -r
6813a10581945910d6197a67b672d07276c6e2e0 doc/install.txt
--- a/doc/install.txt
+++ b/doc/install.txt
@@ -8,7 +8,7 @@
**Operating systems**: Linux, Windows, OSX, Unix
-**Installer Requirements**: setuptools_ or Distribute_
+**Installer Requirements**: setuptools_
**License**: MIT license
diff -r 7c15500c388337c46627a22668ed3d12a3df412b -r
6813a10581945910d6197a67b672d07276c6e2e0 doc/plugins.txt
--- a/doc/plugins.txt
+++ b/doc/plugins.txt
@@ -66,13 +66,16 @@
-tox hook specifications
-----------------------------
+tox hook specifications and related API
+---------------------------------------
.. automodule:: tox.hookspecs
-.. autoclass:: tox.config.Parser
+.. autoclass:: tox.config.Parser()
:members:
-.. autoclass:: tox.config.Config
+.. autoclass:: tox.config.Config()
:members:
+
+.. autoclass:: tox.config.TestenvConfig()
+ :members:
diff -r 7c15500c388337c46627a22668ed3d12a3df412b -r
6813a10581945910d6197a67b672d07276c6e2e0 tox.ini
--- a/tox.ini
+++ b/tox.ini
@@ -19,7 +19,7 @@
py.test -v check_sphinx.py {posargs}
[testenv:flakes]
-qwe = 123
+platform=linux
deps = pytest-flakes>=0.2
pytest-pep8
diff -r 7c15500c388337c46627a22668ed3d12a3df412b -r
6813a10581945910d6197a67b672d07276c6e2e0 tox/config.py
--- a/tox/config.py
+++ b/tox/config.py
@@ -56,19 +56,24 @@
""" add an ini-file variable for "testenv" section.
Types are specified as strings like "bool", "line-list", "string",
"argv", "path",
- "argvlist". The ``postprocess`` function will be called for each
testenv
- like ``postprocess(config=config, reader=reader,
section_val=section_val)``
- where ``section_val`` is the value as read from the ini (or the
default value).
- Any postprocess function must return a value which will then become the
- eventual value in the testenv section.
+ "argvlist".
+
+ The ``postprocess`` function will be called for each testenv
+ like ``postprocess(testenv_config=testenv_config, value=value)``
+ where ``value`` is the value as read from the ini (or the default
value)
+ and ``testenv_config`` is a :py:class:`tox.config.TestenvConfig`
instance
+ which will receive all ini-variables as object attributes.
+
+ Any postprocess function must return a value which will then be set
+ as the final value in the testenv section.
"""
self._testenv_attr.append(VenvAttribute(name, type, default, help,
postprocess))
def add_testenv_attribute_obj(self, obj):
""" add an ini-file variable as an object.
- This works as ``add_testenv_attribute`` but expects "name", "type",
"help",
- and "postprocess" attributes on the object.
+ This works as the ``add_testenv_attribute`` function but expects
+ "name", "type", "help", and "postprocess" attributes on the object.
"""
assert hasattr(obj, "name")
assert hasattr(obj, "type")
@@ -98,9 +103,10 @@
help = "each line specifies a dependency in pip/setuptools format."
default = ()
- def postprocess(self, config, reader, section_val):
+ def postprocess(self, testenv_config, value):
deps = []
- for depline in section_val:
+ config = testenv_config.config
+ for depline in value:
m = re.match(r":(\w+):\s*(\S+)", depline)
if m:
iname, name = m.groups()
@@ -145,19 +151,20 @@
default = True
help = "treat positional args in commands as paths"
- def postprocess(self, config, reader, section_val):
+ def postprocess(self, testenv_config, value):
+ config = testenv_config.config
args = config.option.args
if args:
- if section_val:
+ if value:
args = []
for arg in config.option.args:
if arg:
origpath = config.invocationcwd.join(arg, abs=True)
if origpath.check():
- arg = reader.getpath("changedir",
".").bestrelpath(origpath)
+ arg =
testenv_config.changedir.bestrelpath(origpath)
args.append(arg)
- reader.addsubstitutions(args)
- return section_val
+ testenv_config._reader.addsubstitutions(args)
+ return value
class InstallcmdOption:
@@ -166,11 +173,11 @@
default = "pip install {opts} {packages}"
help = "install command for dependencies and package under test."
- def postprocess(self, config, reader, section_val):
- if '{packages}' not in section_val:
+ def postprocess(self, testenv_config, value):
+ if '{packages}' not in value:
raise tox.exception.ConfigError(
"'install_command' must contain '{packages}' substitution")
- return section_val
+ return value
def parseconfig(args=None):
@@ -332,10 +339,10 @@
name="envlogdir", type="path", default="{envdir}/log",
help="venv log directory")
- def downloadcache(config, reader, section_val):
- if section_val:
+ def downloadcache(testenv_config, value):
+ if value:
# env var, if present, takes precedence
- downloadcache = os.environ.get("PIP_DOWNLOAD_CACHE", section_val)
+ downloadcache = os.environ.get("PIP_DOWNLOAD_CACHE", value)
return py.path.local(downloadcache)
parser.add_testenv_attribute(
@@ -359,17 +366,18 @@
help="if set to True all commands will be executed irrespective of
their "
"result error status.")
- def recreate(config, reader, section_val):
- if config.option.recreate:
+ def recreate(testenv_config, value):
+ if testenv_config.config.option.recreate:
return True
- return section_val
+ return value
parser.add_testenv_attribute(
name="recreate", type="bool", default=False, postprocess=recreate,
help="always recreate this test environment.")
- def setenv(config, reader, section_val):
- setenv = section_val
+ def setenv(testenv_config, value):
+ setenv = value
+ config = testenv_config.config
if "PYTHONHASHSEED" not in setenv and config.hashseed is not None:
setenv['PYTHONHASHSEED'] = config.hashseed
return setenv
@@ -378,7 +386,7 @@
name="setenv", type="dict", postprocess=setenv,
help="list of X=Y lines with environment variable settings")
- def passenv(config, reader, section_val):
+ def passenv(testenv_config, value):
passenv = set(["PATH"])
# we ensure that tmp directory settings are passed on
@@ -392,7 +400,7 @@
passenv.add("TMP")
else:
passenv.add("TMPDIR")
- for spec in section_val:
+ for spec in value:
for name in os.environ:
if fnmatchcase(name.upper(), spec.upper()):
passenv.add(name)
@@ -413,36 +421,37 @@
help="regular expression which must match against ``sys.platform``. "
"otherwise testenv will be skipped.")
- def sitepackages(config, reader, section_val):
- return config.option.sitepackages or section_val
+ def sitepackages(testenv_config, value):
+ return testenv_config.config.option.sitepackages or value
parser.add_testenv_attribute(
name="sitepackages", type="bool", default=False,
postprocess=sitepackages,
help="Set to ``True`` if you want to create virtual environments that
also "
"have access to globally installed packages.")
- def pip_pre(config, reader, section_val):
- return config.option.pre or section_val
+ def pip_pre(testenv_config, value):
+ return testenv_config.config.option.pre or value
parser.add_testenv_attribute(
name="pip_pre", type="bool", default=False, postprocess=pip_pre,
help="If ``True``, adds ``--pre`` to the ``opts`` passed to "
"the install command. ")
- def develop(config, reader, section_val):
- return not config.option.installpkg and (section_val or
config.option.develop)
+ def develop(testenv_config, value):
+ option = testenv_config.config.option
+ return not option.installpkg and (value or option.develop)
parser.add_testenv_attribute(
name="usedevelop", type="bool", postprocess=develop, default=False,
help="install package in develop/editable mode")
- def basepython_default(config, reader, section_val):
- if section_val is None:
- for f in reader.factors:
+ def basepython_default(testenv_config, value):
+ if value is None:
+ for f in testenv_config.factors:
if f in default_factors:
return default_factors[f]
return sys.executable
- return str(section_val)
+ return str(value)
parser.add_testenv_attribute(
name="basepython", type="string", default=None,
postprocess=basepython_default,
@@ -458,6 +467,7 @@
class Config(object):
+ """ Global Tox config object. """
def __init__(self, pluginmanager, option, interpreters):
#: dictionary containing envname to envconfig mappings
self.envconfigs = {}
@@ -475,13 +485,23 @@
return homedir
-class VenvConfig:
- def __init__(self, envname, config):
+class TestenvConfig:
+ """ Testenv Configuration object.
+ In addition to some core attributes/properties this config object holds all
+ per-testenv ini attributes as attributes, see "tox --help-ini" for an
overview.
+ """
+ def __init__(self, envname, config, factors, reader):
+ #: test environment name
self.envname = envname
+ #: global tox config object
self.config = config
+ #: set of factors
+ self.factors = factors
+ self._reader = reader
@property
def envbindir(self):
+ """ path to directory where scripts/binaries reside. """
if (sys.platform == "win32"
and "jython" not in self.basepython
and "pypy" not in self.basepython):
@@ -491,6 +511,7 @@
@property
def envpython(self):
+ """ path to python/jython executable. """
if "jython" in str(self.basepython):
name = "jython"
else:
@@ -499,6 +520,9 @@
# no @property to avoid early calling (see callable(subst[key]) checks)
def envsitepackagesdir(self):
+ """ return sitepackagesdir of the virtualenv environment.
+ (only available during execution, not parsing)
+ """
self.getsupportedinterpreter() # for throwing exceptions
x = self.config.interpreters.get_sitepackagesdir(
info=self.python_info,
@@ -507,6 +531,7 @@
@property
def python_info(self):
+ """ return sitepackagesdir of the virtualenv environment. """
return self.config.interpreters.get_info(envconfig=self)
def getsupportedinterpreter(self):
@@ -650,13 +675,12 @@
return factors
def make_envconfig(self, name, section, subs, config):
- vc = VenvConfig(config=config, envname=name)
factors = set(name.split('-'))
reader = SectionReader(section, self._cfg,
fallbacksections=["testenv"],
factors=factors)
+ vc = TestenvConfig(config=config, envname=name, factors=factors,
reader=reader)
reader.addsubstitutions(**subs)
reader.addsubstitutions(envname=name)
- reader.vc = vc
for env_attr in config._testenv_attr:
atype = env_attr.type
@@ -671,7 +695,7 @@
raise ValueError("unknown type %r" % (atype,))
if env_attr.postprocess:
- res = env_attr.postprocess(config, reader, res)
+ res = env_attr.postprocess(testenv_config=vc, value=res)
setattr(vc, env_attr.name, res)
if atype == "path":
@@ -785,9 +809,8 @@
def getpath(self, name, defaultpath):
toxinidir = self._subs['toxinidir']
path = self.getstring(name, defaultpath)
- if path is None:
- return path
- return toxinidir.join(path, abs=True)
+ if path is not None:
+ return toxinidir.join(path, abs=True)
def getlist(self, name, sep="\n"):
s = self.getstring(name, None)
@@ -952,11 +975,11 @@
class _ArgvlistReader:
@classmethod
- def getargvlist(cls, reader, section_val):
+ def getargvlist(cls, reader, value):
"""Parse ``commands`` argvlist multiline string.
:param str name: Key name in a section.
- :param str section_val: Content stored by key.
+ :param str value: Content stored by key.
:rtype: list[list[str]]
:raise :class:`tox.exception.ConfigError`:
@@ -964,7 +987,7 @@
"""
commands = []
current_command = ""
- for line in section_val.splitlines():
+ for line in value.splitlines():
line = line.rstrip()
i = line.find("#")
if i != -1:
https://bitbucket.org/hpk42/tox/commits/892c54b52a04/
Changeset: 892c54b52a04
User: hpk42
Date: 2015-05-12 19:42:12+00:00
Summary: show all registered per-testenv ini values
Affected #: 2 files
diff -r 6813a10581945910d6197a67b672d07276c6e2e0 -r
892c54b52a044ac8dc46fc302ea96f4d755dad9d tests/test_config.py
--- a/tests/test_config.py
+++ b/tests/test_config.py
@@ -1566,14 +1566,14 @@
result = cmd.run("tox", "--showconfig")
assert result.ret == 0
result.stdout.fnmatch_lines([
- r'*deps=*dep1==2.3, dep2*',
+ r'*deps*dep1==2.3, dep2*',
])
# override dep1 specific version, and force version for dep2
result = cmd.run("tox", "--showconfig", "--force-dep=dep1",
"--force-dep=dep2==5.0")
assert result.ret == 0
result.stdout.fnmatch_lines([
- r'*deps=*dep1, dep2==5.0*',
+ r'*deps*dep1, dep2==5.0*',
])
diff -r 6813a10581945910d6197a67b672d07276c6e2e0 -r
892c54b52a044ac8dc46fc302ea96f4d755dad9d tox/session.py
--- a/tox/session.py
+++ b/tox/session.py
@@ -594,25 +594,9 @@
self.report.tw.line()
for envconfig in self.config.envconfigs.values():
self.report.line("[testenv:%s]" % envconfig.envname, bold=True)
- self.report.line(" basepython=%s" % envconfig.basepython)
- self.report.line(" pythoninfo=%s" % (envconfig.python_info,))
- self.report.line(" envpython=%s" % envconfig.envpython)
- self.report.line(" envtmpdir=%s" % envconfig.envtmpdir)
- self.report.line(" envbindir=%s" % envconfig.envbindir)
- self.report.line(" envlogdir=%s" % envconfig.envlogdir)
- self.report.line(" changedir=%s" % envconfig.changedir)
- self.report.line(" args_are_path=%s" % envconfig.args_are_paths)
- self.report.line(" install_command=%s" %
- envconfig.install_command)
- self.report.line(" commands=")
- for command in envconfig.commands:
- self.report.line(" %s" % command)
- self.report.line(" deps=%s" % envconfig.deps)
- self.report.line(" envdir= %s" % envconfig.envdir)
- self.report.line(" downloadcache=%s" % envconfig.downloadcache)
- self.report.line(" usedevelop=%s" % envconfig.usedevelop)
- self.report.line(" setenv=%s" % envconfig.setenv)
- self.report.line(" passenv=%s" % envconfig.passenv)
+ for attr in self.config._parser._testenv_attr:
+ self.report.line(" %-15s = %s"
+ % (attr.name, getattr(envconfig, attr.name)))
def showenvs(self):
for env in self.config.envlist:
https://bitbucket.org/hpk42/tox/commits/b7e498efd0ec/
Changeset: b7e498efd0ec
User: hpk42
Date: 2015-05-12 21:02:11+00:00
Summary: 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.
Affected #: 5 files
diff -r 892c54b52a044ac8dc46fc302ea96f4d755dad9d -r
b7e498efd0ecd543a870431ea8d34f2882d5ace8 CHANGELOG
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -2,10 +2,10 @@
-----------
- (new) introduce environment variable isolation:
- tox now only passes the PATH variable from the tox
+ tox now only passes the PATH and PIP_INDEX_URL variable from the tox
invocation environment to the test environment and on Windows
also ``SYSTEMROOT``, ``PATHEXT``, ``TEMP`` and ``TMP`` whereas
- on linux additionally ``TMPDIR`` is passed. If you need to pass
+ on unix additionally ``TMPDIR`` is passed. If you need to pass
through further environment variables you can use the new ``passenv``
setting,
a space-separated list of environment variable names. Each name
can make use of fnmatch-style glob patterns. All environment
diff -r 892c54b52a044ac8dc46fc302ea96f4d755dad9d -r
b7e498efd0ecd543a870431ea8d34f2882d5ace8 doc/announce/release-2.0.txt
--- a/doc/announce/release-2.0.txt
+++ b/doc/announce/release-2.0.txt
@@ -55,10 +55,10 @@
-----------
- (new) introduce environment variable isolation:
- tox now only passes the PATH variable from the tox
+ tox now only passes the PATH and PIP_INDEX_URL variable from the tox
invocation environment to the test environment and on Windows
also ``SYSTEMROOT``, ``PATHEXT``, ``TEMP`` and ``TMP`` whereas
- on linux additionally ``TMPDIR`` is passed. If you need to pass
+ on unix additionally ``TMPDIR`` is passed. If you need to pass
through further environment variables you can use the new ``passenv``
setting,
a space-separated list of environment variable names. Each name
can make use of fnmatch-style glob patterns. All environment
@@ -109,4 +109,3 @@
experimental plugin hooks, use tox internals at your own risk.
- DEPRECATE distshare in documentation
-
diff -r 892c54b52a044ac8dc46fc302ea96f4d755dad9d -r
b7e498efd0ecd543a870431ea8d34f2882d5ace8 doc/config.txt
--- a/doc/config.txt
+++ b/doc/config.txt
@@ -199,8 +199,9 @@
invocation environment it is ignored. You can use ``*`` and ``?`` to
match multiple environment variables with one name.
- Note that the ``PATH`` variable is unconditionally passed down and on
- Windows ``SYSTEMROOT`` and ``PATHEXT`` will be passed down as well.
+ Note that the ``PATH`` and ``PIP_INDEX_URL`` variables are unconditionally
+ passed down and on Windows ``SYSTEMROOT``, ``PATHEXT``, ``TEMP`` and ``TMP``
+ will be passed down as well whereas on unix ``TMPDIR`` will be passed down.
You can override these variables with the ``setenv`` option.
.. confval:: recreate=True|False(default)
diff -r 892c54b52a044ac8dc46fc302ea96f4d755dad9d -r
b7e498efd0ecd543a870431ea8d34f2882d5ace8 tests/test_config.py
--- a/tests/test_config.py
+++ b/tests/test_config.py
@@ -715,6 +715,7 @@
else:
assert "TMPDIR" in envconfig.passenv
assert "PATH" in envconfig.passenv
+ assert "PIP_INDEX_URL" in envconfig.passenv
assert "A123A" in envconfig.passenv
assert "A123B" in envconfig.passenv
diff -r 892c54b52a044ac8dc46fc302ea96f4d755dad9d -r
b7e498efd0ecd543a870431ea8d34f2882d5ace8 tox/config.py
--- a/tox/config.py
+++ b/tox/config.py
@@ -387,7 +387,7 @@
help="list of X=Y lines with environment variable settings")
def passenv(testenv_config, value):
- passenv = set(["PATH"])
+ passenv = set(["PATH", "PIP_INDEX_URL"])
# we ensure that tmp directory settings are passed on
# we could also set it to the per-venv "envtmpdir"
Repository URL: https://bitbucket.org/hpk42/tox/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
_______________________________________________
pytest-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pytest-commit