summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorholger krekel <holger@merlinux.eu>2015-10-30 10:26:00 +0100
committerholger krekel <holger@merlinux.eu>2015-10-30 10:26:00 +0100
commit1a13d40b563d161c3558da81ea0ab55eed38fecd (patch)
treeb481e4b63a54be548f5c53f2493d73d3f5f77778
parent77eb5d72a28abbe4455bc96526808a283f9049d3 (diff)
parentbec8532fcc03ed2303e8fce91357eaad1a845096 (diff)
downloadtox-1a13d40b563d161c3558da81ea0ab55eed38fecd.tar.gz
Merged in itxaka/tox/fix_env_use (pull request #169)
Tries to fix #99
-rw-r--r--CHANGELOG11
-rw-r--r--setup.py2
-rw-r--r--tests/test_config.py12
-rw-r--r--tox/__init__.py2
-rw-r--r--tox/config.py27
5 files changed, 38 insertions, 16 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 54ea8be..2a9be6d 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,14 @@
+2.1.2 (dev)
+-----------
+
+- fix issue265 and add LD_LIBRARY_PATH to passenv on linux by default
+ because otherwise the python interpreter might not start up in
+ certain configurations (redhat software collections). Thanks David Riddle.
+
+- fix issue246: fix regression in config parsing by reordering
+ such that {envbindir} can be used again in tox.ini. Thanks Olli Walsh.
+
+
2.1.1
----------
diff --git a/setup.py b/setup.py
index a72a5fc..db09786 100644
--- a/setup.py
+++ b/setup.py
@@ -48,7 +48,7 @@ def main():
description='virtualenv-based automation of test activities',
long_description=open("README.rst").read(),
url='http://tox.testrun.org/',
- version='2.1.1',
+ version='2.1.2.dev1',
license='http://opensource.org/licenses/MIT',
platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'],
author='holger krekel',
diff --git a/tests/test_config.py b/tests/test_config.py
index 74b978b..af77b49 100644
--- a/tests/test_config.py
+++ b/tests/test_config.py
@@ -949,6 +949,18 @@ class TestConfigTestEnv:
assert argv[7][0] == config.homedir.join(".tox", "distshare")
assert argv[8][0] == conf.envlogdir
+ def test_substitution_notfound_issue246(tmpdir, newconfig):
+ config = newconfig("""
+ [testenv:py27]
+ setenv =
+ FOO={envbindir}
+ BAR={envsitepackagesdir}
+ """)
+ conf = config.envconfigs['py27']
+ env = conf.setenv
+ assert 'FOO' in env
+ assert 'BAR' in env
+
def test_substitution_positional(self, newconfig):
inisource = """
[testenv:py27]
diff --git a/tox/__init__.py b/tox/__init__.py
index b2fed05..c4f8107 100644
--- a/tox/__init__.py
+++ b/tox/__init__.py
@@ -1,5 +1,5 @@
#
-__version__ = '2.1.1'
+__version__ = '2.1.2.dev1'
from .hookspecs import hookspec, hookimpl # noqa
diff --git a/tox/config.py b/tox/config.py
index cd7a84d..1c16c36 100644
--- a/tox/config.py
+++ b/tox/config.py
@@ -320,6 +320,18 @@ def tox_addoption(parser):
help="additional arguments available to command positional substitution")
# add various core venv interpreter attributes
+ 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(value)
+
+ parser.add_testenv_attribute(
+ name="basepython", type="string", default=None, postprocess=basepython_default,
+ help="executable name or path of interpreter used to create a "
+ "virtual test environment.")
parser.add_testenv_attribute(
name="envdir", type="path", default="{toxworkdir}/{envname}",
@@ -453,19 +465,6 @@ def tox_addoption(parser):
name="usedevelop", type="bool", postprocess=develop, default=False,
help="install package in develop/editable mode")
- 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(value)
-
- parser.add_testenv_attribute(
- name="basepython", type="string", default=None, postprocess=basepython_default,
- help="executable name or path of interpreter used to create a "
- "virtual test environment.")
-
parser.add_testenv_attribute_obj(InstallcmdOption())
parser.add_testenv_attribute_obj(DepOption())
@@ -709,7 +708,7 @@ class parseini:
if atype == "path":
reader.addsubstitutions(**{env_attr.name: res})
- if env_attr.name == "install_command":
+ if env_attr.name == "envdir":
reader.addsubstitutions(envbindir=vc.envbindir, envpython=vc.envpython,
envsitepackagesdir=vc.envsitepackagesdir)
return vc