[tox]
envlist = py{27,36,37,38,39}-sphinx{16,17,18,20,21,22,23,24,30,31,32,33,34,35,40,latest}

[testenv]
setev =
    LANG=C
deps =
    .
    readthedocs-sphinx-ext
    pytest
    sphinxcontrib-httpdomain
    sphinx16: Sphinx < 1.7
    sphinx17: Sphinx < 1.8
    sphinx18: Sphinx < 1.9
    sphinx20: Sphinx < 2.1
    sphinx21: Sphinx < 2.2
    sphinx22: Sphinx < 2.3
    sphinx23: Sphinx < 2.4
    sphinx24: Sphinx < 2.5
    sphinx30: Sphinx < 3.1
    sphinx31: Sphinx < 3.2
    sphinx32: Sphinx < 3.3
    sphinx33: Sphinx < 3.4
    sphinx34: Sphinx < 3.5
    sphinx35: Sphinx < 4.0
    sphinx40: Sphinx < 4.1
    sphinxlatest: Sphinx
commands =
    pytest {posargs} tests/
    sphinx-build -b html -d {envtmpdir}/doctrees docs/ {envtmpdir}/html

[tox]
envlist = py{27,36,37,38,39}-sphinx{16,17,18,20,21,22,23,24,30,31,32,33,34,35,40,latest}

[testenv]
setev =
    LANG=C
deps =
    .
    readthedocs-sphinx-ext
    pytest
    sphinxcontrib-httpdomain
    sphinx16: Sphinx < 1.7
    sphinx17: Sphinx < 1.8
    sphinx18: Sphinx < 1.9
    sphinx20: Sphinx < 2.1
    sphinx21: Sphinx < 2.2
    sphinx22: Sphinx < 2.3
    sphinx23: Sphinx < 2.4
    sphinx24: Sphinx < 2.5
    sphinx30: Sphinx < 3.1
    sphinx31: Sphinx < 3.2
    sphinx32: Sphinx < 3.3
    sphinx33: Sphinx < 3.4
    sphinx34: Sphinx < 3.5
    sphinx35: Sphinx < 3.6
    sphinx40: Sphinx < 4.1
    sphinxlatest: Sphinx
commands =
    pytest {posargs} tests/
    sphinx-build -b html -d {envtmpdir}/doctrees docs/ {envtmpdir}/html

Make sphinx version comparison constistent
Make sphinx version comparison constistent

Co-authored-by: Anthony <2048b22ac0881f917af3e938105055ab85498548@ohess.org>