[tox]
envlist = py{27,35,36,37,38,py,py3}-{base,six19,optional}

[testenv]
deps =
  optional: -r{toxinidir}/requirements-optional.txt
  -r{toxinidir}/requirements-test.txt
  doc: Sphinx

passenv =
  PYTEST_COMMAND
  COVERAGE_RUN_OPTIONS
commands =
  six19: pip install six==1.9
  {env:PYTEST_COMMAND:{envbindir}/py.test} {posargs}
  flake8 {toxinidir}

[testenv:doc]
changedir = doc
commands = sphinx-build -b html . _build
