[tox]
envlist = py27,py34,pep8
minversion = 1.6
skipsdist = True

[testenv]
#usedevelop = True
install_command = pip install -U {opts} {packages}
deps = -r{toxinidir}/test-requirements.txt
       -r{toxinidir}/requirements.txt
setenv = VIRTUAL_ENV={envdir}
         SCHEMAS_PATH={distdir}/schemas/data
commands =
    python setup.py testr --slowest --testr-args="{posargs}"

sitepackages = False

[testenv:cover]
setenv = VIRTUAL_ENV={envdir}
commands =
  python setup.py testr --coverage --testr-args="{posargs}"

[testenv:pep8]
commands = flake8 {posargs}

[testenv:venv]
commands = {posargs}

[testenv:docs]
commands =
    rm -rf doc/html doc/build
    rm -rf doc/source/apidoc doc/source/api
    python setup.py build_sphinx

[flake8]
show-source = true
exclude=.venv,.git,.tox,build,dist,doc,*openstack/common*,*lib/python*,*egg,tools,lextab.py,parsetab.py

[hacking]
import_exceptions =

[testenv:pylint]
commands = pylint vyconfd

[tox]
envlist = py27,py34,pep8
minversion = 1.6
skipsdist = True

[testenv]
#usedevelop = True
install_command = pip install -U {opts} {packages}
deps = -r{toxinidir}/test-requirements.txt
       -r{toxinidir}/requirements.txt
setenv = VIRTUAL_ENV={envdir}
         SCHEMAS_PATH={distdir}/schemas/data

commands =
    {toxinidir}/scripts/rnc2rng.sh one data/schemas/interface_definition.rnc data/schemas/interface_definition.rng
    python setup.py testr --slowest --testr-args="{posargs}"

sitepackages = False

[testenv:cover]
setenv = VIRTUAL_ENV={envdir}
commands =
  python setup.py testr --coverage --testr-args="{posargs}"

[testenv:pep8]
commands = flake8 {posargs}

[testenv:venv]
commands = {posargs}

[testenv:docs]
commands =
    rm -rf doc/html doc/build
    rm -rf doc/source/apidoc doc/source/api
    python setup.py build_sphinx

[flake8]
show-source = true
exclude=.venv,.git,.tox,build,dist,doc,*openstack/common*,*lib/python*,*egg,tools,lextab.py,parsetab.py

[hacking]
import_exceptions =

[testenv:pylint]
commands = pylint vyconfd

Add RelaxNG generation before running tests.
Add RelaxNG generation before running tests.

tox is unable to use a normal relative path, so it's achieved by using
{toxini}/ path for the script, which introduced additional assumptions
about project layout, but at least it works.
