I'm trying to use Tox 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 Tox docs 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.
I also tried:
deps =
-r{toxinidir}/pip-requirements.txt
-r{toxinidir}/pip-requirements-test.txt
django15: Django>=1.5,<1.6
django16: Django>=1.6,<1.7
and although that doesn't give me any parsing error, when I go to run a test, I get the error:
ERROR: py27-django15: could not install deps [-r/usr/local/myproject/pip-requirements.txt, -r/usr/local/myproject/pip-requirements-test.txt, Django>=1.5,<1.6]; v = InvocationError('/usr/local/myproject/.tox/py27-django15/bin/pip install -r/usr/local/myproject/pip-requirements.txt -r/usr/local/myproject/pip-requirements-test.txt Django>=1.5,<1.6 (see /usr/local/myproject/.tox/py27-django15/log/py27-django15-1.log)', 1)
presumably because it's interpreting the requirements file as a literal Python package name.