vendredi 29 janvier 2016

How to combine per-env deps with a requirements file with Tox?

I'm trying to test specific versions of Python and Django, but also include a general PIP requirements file of additional dependencies to use for all cases.

As the docs (http://ift.tt/1JMpr2m) explain, you do the first like:

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

and you do the second like:

deps = -r{toxinidir}/pip-requirements.txt
       -r{toxinidir}/pip-requirements-test.txt

but how do you combine these?

If I try to define multiple deps, Tox gives me the error "duplicate name 'deps'", but I don't see a way to combine the dictionary and list notatations for deps.

Aucun commentaire:

Enregistrer un commentaire