[tox]
skipsdist = true

[testenv:pip-compile]
# Use python2.7, which is what CentOS still comes with
basepython = python2.7
description = Update the requirements.txt file
skip_install = true
deps =
    pip==10.0.1
    pip-tools==2.0.2
commands =
    pip-compile --index --emit-trusted-host --annotate --upgrade --generate-hashes -o "{toxinidir}/docs/requirements.txt" "{toxinidir}/docs/requirements.in"
setenv =
    CUSTOM_COMPILE_COMMAND = tox -e pip-compile

[testenv:docs]
description = Render documentation
skip_install = true
deps =
    -r{toxinidir}/docs/requirements.txt
commands =
    make -C docs {posargs:html} SPHINXOPTS="-j 4 -n -W"
whitelist_externals =
    make
