[tox]
envlist = py{27,35}-py2neo{16,2}, pypy-py2neo2, lint, docs

[testenv]
passenv = NEO4J_URI
setenv =
    PY2NEO_COMPAT = {env:PY2NEO_COMPAT:-e../python-py2neo_compat}
deps =
    .[test]
    {env:PY2NEO_COMPAT}
    py2neo16: py2neo ~= 1.6.4
    py2neo2: py2neo ~= 2.0.8
commands =
    py.test --basetemp={envtmpdir} {posargs}

[testenv:lint]
ignore_outcome = True
skip_install = True
deps =
    .[lint]
commands =
    python setup.py flake8

[testenv:docs]
skip_install = True
changedir=docs/
deps =
    -r{toxinidir}/requirements.txt
    sphinx
    setuptools_scm
commands =
    sphinx-build -b linkcheck ./ _build/
    sphinx-build -b html ./ _build/

[tox]
envlist = py{27,35}-py2neo{16,2}, pypy-py2neo2, lint, docs

[testenv]
passenv = NEO4J_URI
setenv =
    PY2NEO_COMPAT = {env:PY2NEO_COMPAT:-e../python-py2neo_compat}
extras = test
deps =
    {env:PY2NEO_COMPAT}
    py2neo16: py2neo ~= 1.6.4
    py2neo2: py2neo ~= 2.0.8
commands =
    py.test --basetemp={envtmpdir} {posargs}

[testenv:lint]
ignore_outcome = True
skip_install = True
deps =
    .[lint]
commands =
    python setup.py flake8

[testenv:docs]
skip_install = True
changedir=docs/
deps =
    -r{toxinidir}/requirements.txt
    sphinx
    setuptools_scm
commands =
    sphinx-build -b linkcheck ./ _build/
    sphinx-build -b html ./ _build/

Use Tox's 'extras' to install
Use Tox's 'extras' to install

This prevents installing the package itself twice, in addition to being
the more obvious way to do it.
