summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Schepanovski <suor.web@gmail.com>2015-02-23 20:15:37 +0700
committerAlexander Schepanovski <suor.web@gmail.com>2015-02-23 20:15:37 +0700
commitf130227ccf98a87572f5f41868112cd6847dd043 (patch)
treec188912bbcdaa62d368575c7498d67f9772672f6
parent24279a0855550a164004a9c5edc10c06826e58b2 (diff)
downloadtox-f130227ccf98a87572f5f41868112cd6847dd043.tar.gz
Add generative config example
-rw-r--r--doc/config.txt6
-rw-r--r--doc/example/basic.txt19
2 files changed, 23 insertions, 2 deletions
diff --git a/doc/config.txt b/doc/config.txt
index d743e1b..b5a717f 100644
--- a/doc/config.txt
+++ b/doc/config.txt
@@ -261,7 +261,7 @@ Complete list of settings that you can put into ``testenv*`` sections:
Do not install the current package. This can be used when you need the
virtualenv management but do not want to install the current package
into that environment.
-
+
**default**: ``False``
@@ -449,6 +449,8 @@ This uses two new facilities of tox-1.8:
Let's go through this step by step.
+.. _generative-envlist:
+
Generative envlist
+++++++++++++++++++++++
@@ -482,6 +484,8 @@ You can still list environments explicitly along with generated ones::
flake
+.. _factors:
+
Factors and factor-conditional settings
++++++++++++++++++++++++++++++++++++++++
diff --git a/doc/example/basic.txt b/doc/example/basic.txt
index 916990e..e0dbece 100644
--- a/doc/example/basic.txt
+++ b/doc/example/basic.txt
@@ -74,7 +74,7 @@ depending on requirements.txt
(experimental) If you have a ``requirements.txt`` file
you can add it to your ``deps`` variable like this::
- deps = -rrequirements.txt
+ deps = -rrequirements.txt
All installation commands are executed using ``{toxinidir}``
(the directory where ``tox.ini`` resides) as the current
@@ -260,3 +260,20 @@ In some cases, you may want to ignore a command exit code. For example::
By using the ``-`` prefix, similar to a ``make`` recipe line, you can ignore
the exit code for that command.
+
+Compressing dependency matrix
+-----------------------------
+
+If you have a large matrix of dependencies, python versions and/or environments you can
+use :ref:`generative-envlist` and :ref:`conditional settings <factors>` to express that in a concise form::
+
+ [tox]
+ envlist = py{26,27,33}-django{15,16}-{sqlite,mysql}
+
+ [testenv]
+ deps =
+ django15: Django>=1.5,<1.6
+ django16: Django>=1.6,<1.7
+ py33-mysql: PyMySQL ; use if both py33 and mysql are in an env name
+ py26,py27: urllib3 ; use if any of py26 or py27 are in an env name
+ py{26,27}-sqlite: mock ; mocking sqlite in python 2.x