
[tox]
envlist = lint,docs,py3-pycryptodome,py3-cryptography,py3

[package]
name = rarfile
deps =
    pycryptodome: pycryptodome==3.20.0
    cryptography: cryptography==42.0.5
test_deps =
    #coverage==7.3.1
    coverage==7.4.4
    pytest==8.1.1
    pytest-cov==5.0.0
    pytest-xdist==3.5.0
doc_deps =
    sphinx==7.2.6
    docutils==0.20.1
lint_deps =
    pylint==3.1.0

[testenv]
deps =
    {[package]deps}
    {[package]test_deps}
commands =
    pytest --cov=rarfile --cov-report=term --cov-report=html:{toxinidir}/cover/{envname} {posargs}
    sh ./test/run_dump.sh {envpython} {envname}
allowlist_externals = sh

[testenv:lint]
basepython = python3
deps =
    {[package]deps}
    {[package]lint_deps}
    {[package]test_deps}
commands =
    pylint rarfile.py dumprar.py test

[testenv:docs]
basepython = python3
deps = {[package]doc_deps}
changedir = doc
commands =
    sphinx-build -q -W -b html -d {envtmpdir}/doctrees . ../tmp/dochtml

