[tox]
envlist = py36,py37,py38,py39,py310,py311,pypy3,docs,readme,bandit,isort

[testenv]
deps=
    -rrequirements-test.txt
commands=
    pytest --cov=oauthlib tests/


# tox -e docs to mimick readthedocs build.
# as of today, RTD is using python3.6 and doesn't run "setup.py install"
[testenv:docs]
basepython=python3.6
skipsdist=True
deps=
        sphinx
        sphinx_rtd_theme
changedir=docs
whitelist_externals=make
commands=make clean html

# tox -e readme to mimick PyPI long_description check
[testenv:readme]
basepython=python3.8
deps=twine>=1.12.0
whitelist_externals=echo
commands=
        twine check .tox/dist/*

[testenv:bandit]
basepython=python3.8
skipsdist=True
deps=bandit
commands=bandit -b bandit.json -r oauthlib/
whitelist_externals=bandit

[testenv:isort]
basepython = python3.8
usedevelop = false
deps = isort
changedir = {toxinidir}
commands = isort --recursive --check-only --diff oauthlib tests

[tox]
envlist = py36,py37,py38,py39,py310,py311,pypy3,docs,readme,bandit,isort

[testenv]
deps=
    -rrequirements-test.txt
commands=
    pytest --cov=oauthlib tests/


# tox -e docs to mimick readthedocs build.
# as of today, RTD is using python3.7 and doesn't run "setup.py install"
[testenv:docs]
basepython=python3.7
skipsdist=True
deps=
        sphinx
        sphinx_rtd_theme
changedir=docs
whitelist_externals=make
commands=make clean html

# tox -e readme to mimick PyPI long_description check
[testenv:readme]
basepython=python3.8
deps=twine>=1.12.0
whitelist_externals=echo
commands=
        twine check .tox/dist/*

[testenv:bandit]
basepython=python3.8
skipsdist=True
deps=bandit
commands=bandit -b bandit.json -r oauthlib/
whitelist_externals=bandit

[testenv:isort]
basepython = python3.8
usedevelop = false
deps = isort
changedir = {toxinidir}
commands = isort --recursive --check-only --diff oauthlib tests

Set python3.7 since RTD has switched to python3.7
Set python3.7 since RTD has switched to python3.7
