[flake8]
#show-source = True
max-line-length = 120
exclude = .tox,.venv,build,dist,doc,migrations,urls.py,runtests.py,settings_test.py
# Ignore N802 (functions in lowercase) because the setUp() function in tests
ignore = N802

[tox]
envlist =
    py27-1.7, py27-1.8, py27-master,
    py33-1.7, py33-1.8,
    py34-1.7, py34-1.8, py34-master,
    py35-1.7, py35-1.8, py35-master,
    docs
skipsdist = True

[testenv]
passenv = HOME
setenv =
       DJANGO_SETTINGS_MODULE=zds.settings
       PYTHONPATH = {toxinidir}
       PYTHONDONTWRITEBYTECODE = 1
whitelist_externals=*

deps = -r{toxinidir}/requirements.txt
       -r{toxinidir}/requirements-dev.txt
commands = 
    coverage run --source='.' {toxinidir}/runtests.py {posargs}
    flake8

[testenv:docs]
# to call this use `tox -e docs -- html`
deps =
    Sphinx

changedir = doc

commands =
    make html

whitelist_external = make

[testenv:flake8]
commands = flake8 {posargs}

[testenv:py27-1.7]
basepython = python2.7
deps =
    {[testenv]deps}
    Django<1.8

[testenv:py27-1.8]
basepython = python2.7
deps =
    {[testenv]deps}
    Django<1.9

[testenv:py27-master]
basepython = python2.7
deps =
    {[testenv]deps}
    https://github.com/django/django/tarball/master

[testenv:py33-1.7]
basepython = python3.3
deps =
    {[testenv]deps}
    Django<1.8

[testenv:py33-1.8]
basepython = python3.3
deps =
    {[testenv]deps}
    Django<1.9

[testenv:py34-1.7]
basepython = python3.4
deps =
    {[testenv]deps}
    Django<1.8

[testenv:py34-1.8]
basepython = python3.4
deps =
    {[testenv]deps}
    Django<1.9

[testenv:py34-master]
basepython = python3.4
deps =
    {[testenv]deps}
    https://github.com/django/django/tarball/master

[testenv:py35-1.7]
basepython = python3.5
deps =
    {[testenv]deps}
    Django<1.8

[testenv:py35-1.8]
basepython = python3.5
deps =
    {[testenv]deps}
    Django<1.9

[testenv:py35-master]
basepython = python3.5
deps =
    {[testenv]deps}
    https://github.com/django/django/tarball/master

