[tox] Use generating environments
Drop the "env" option, which is unknown, and set a generative_ "envlist". Then
use conditional dependencies based on factors_ to avoid repeating environment
sections. The only singular one is the "cubicweb" environment because of its
"commands".
At some point, it'd be nice to find a way to have python version prefixes
(py27-hooks or py34-web) for environment names but I could not find a way to extract
the package name from such names.
.. _generative: http://tox.readthedocs.org/en/latest/config.html#generative-envlist
.. _factors: http://tox.readthedocs.org/en/latest/config.html#factors-and-factor-conditional-settings
--- a/tox.ini Wed Dec 09 16:32:57 2015 +0100
+++ b/tox.ini Mon Nov 09 11:34:28 2015 +0100
@@ -1,55 +1,26 @@
[tox]
-env = py27
+envlist = cubicweb,dataimport,devtools,entities,etwist,ext,hooks,server,sobjects,web,wsgi
[testenv]
sitepackages = True
+deps =
+ cubicweb: -r{toxinidir}/test/requirements.txt
+ devtools: -r{toxinidir}/devtools/test/requirements.txt
+ entities: -r{toxinidir}/entities/test/requirements.txt
+ etwist: -r{toxinidir}/etwist/test/requirements.txt
+ ext: -r{toxinidir}/ext/test/requirements.txt
+ hooks: -r{toxinidir}/hooks/test/requirements.txt
+ server: -r{toxinidir}/server/test/requirements.txt
+ sobjects: -r{toxinidir}/sobjects/test/requirements.txt
+ web: -r{toxinidir}/web/test/requirements.txt
+ wsgi: -r{toxinidir}/wsgi/test/requirements.txt
commands = pytest -t {envname}/test {posargs}
[testenv:cubicweb]
-deps =
- -r{toxinidir}/test/requirements.txt
commands =
{envpython} -m pip install --upgrade --no-deps --quiet git+git://github.com/logilab/yapps@master#egg=yapps
pytest -t test {posargs}
-[testenv:dataimport]
-
-[testenv:devtools]
-deps =
- -r{toxinidir}/devtools/test/requirements.txt
-
-[testenv:entities]
-deps =
- -r{toxinidir}/entities/test/requirements.txt
-
-[testenv:etwist]
-deps =
- -r{toxinidir}/etwist/test/requirements.txt
-
-[testenv:ext]
-deps =
- -r{toxinidir}/ext/test/requirements.txt
-
-[testenv:hooks]
-deps =
- -r{toxinidir}/hooks/test/requirements.txt
-
-[testenv:server]
-deps =
- -r{toxinidir}/server/test/requirements.txt
-
-[testenv:sobjects]
-deps =
- -r{toxinidir}/sobjects/test/requirements.txt
-
-[testenv:web]
-deps =
- -r{toxinidir}/web/test/requirements.txt
-
-[testenv:wsgi]
-deps =
- -r{toxinidir}/wsgi/test/requirements.txt
-
[testenv:doc]
changedir = doc
whitelist_externals =