[tox]
envlist = py{35,36,37,38}, docs, flake8
# On developers local machines usually not all of
# python3.4...python3.8 interpreters are available, so
# don't fail when a developer just runs "tox" locally.
# This can be overridden (as it should be in CI) using
# "tox --skip-missing-interpreters=false" so that if the CI is
# misconfigured, a missing python version DOES cause a failure
skip_missing_interpreters = true

[default]
basepython = python3

[testenv]
description = Run tests
deps =
    mock
    pytest
commands = py.test test_staticjinja.py


[testenv:docs]
description = Ensure that documentation builds
basepython = {[default]basepython}
changedir = docs
deps = sphinx
commands =
    sphinx-build -W \
    -b html \
    -d {envtmpdir}/doctrees \
    . \
    {envtmpdir}/html


[testenv:flake8]
description = Ensure PEP8 conformity
basepython = {[default]basepython}
deps = flake8>=2.1.0
commands =
    flake8 staticjinja
    flake8 setup.py
    flake8 test_staticjinja.py

[tox]
envlist = py{35,36,37,38}, docs, flake8
# On developers local machines usually not all of
# python3.4...python3.8 interpreters are available, so
# don't fail when a developer just runs "tox" locally.
# This can be overridden (as it should be in CI) using
# "tox --skip-missing-interpreters=false" so that if the CI is
# misconfigured, a missing python version DOES cause a failure
skip_missing_interpreters = true

[default]
basepython = python3

[testenv]
description = Run tests
deps =
    mock==3.0.5   # This is the latest version that works with py35
    pytest==6.1.2
commands = py.test test_staticjinja.py


[testenv:docs]
description = Ensure that documentation builds
basepython = {[default]basepython}
changedir = docs
deps = sphinx<2  # readthedocs seems to specify this low sphinx version
commands =
    sphinx-build -W \
    -b html \
    -d {envtmpdir}/doctrees \
    . \
    {envtmpdir}/html


[testenv:flake8]
description = Ensure PEP8 conformity
basepython = {[default]basepython}
deps = flake8==3.8.4
commands =
    flake8 staticjinja
    flake8 setup.py
    flake8 test_staticjinja.py

Make versions of test, docs, and flake8 dependencies more precise
Make versions of test, docs, and flake8 dependencies more precise

I think this is a good thing to do. The more precise these versions are, the more repeatable these build steps are. It's a bummer that RTD seems to require an old version onf sphinx.

Co-Authored-By: Chris Jerdonek <3ec5ae488bc7ef4c4c2ea303a4cf6277dd8d4897@gmail.com>
