1[tox] 2envlist=py3,check-manifest,mypy,flake8,black,black-run,yamllint 3 4[testenv] 5deps = 6 pytz 7 pytest == 5.4.1 8 git+https://github.com/psycojoker/pytest-capture-deprecatedwarnings 9commands= 10 {envpython} -m pytest test {posargs} 11 12[testenv:docs] 13basepython = python2 14deps = 15 -r docs/requirements-doc.txt 16commands= 17 {envpython} -m sphinx -b html {toxinidir}/docs {toxinidir}/docs/_build/html {posargs} 18 19[testenv:check-manifest] 20skip_install = true 21deps = 22 check-manifest 23commands = 24 {envpython} -m check_manifest {toxinidir} 25 26[testenv:mypy] 27deps = 28 mypy >= 0.761 29commands = mypy --ignore-missing-imports logilab 30 31[testenv:black] 32basepython = python3 33skip_install = true 34deps = 35 black >= 19.10b0 36commands = black --check . 37 38[testenv:black-run] 39basepython = python3 40skip_install = true 41deps = 42 black >= 19.10b0 43commands = black . 44 45[testenv:flake8] 46skip_install = true 47deps = 48 flake8 >= 3.6 49commands = flake8 50 51[flake8] 52basepython = python3 53format = pylint 54ignore = W503, E203, E731, E231 55max-line-length = 100 56exclude = docs/*,.tox/*,./test/data/* 57 58[testenv:pypi-publish] 59basepython = python3 60skip_install = true 61whitelist_externals = rm 62deps = 63 twine 64passenv = 65 TWINE_USERNAME 66 TWINE_PASSWORD 67commands = 68 rm -rf build dist .egg .egg-info 69 python3 setup.py sdist bdist_wheel 70 twine check dist/* 71 twine upload --skip-existing dist/* 72 73[testenv:deb-publish] 74passenv = JENKINS_USER JENKINS_TOKEN 75basepython = python3 76skip_install = true 77whitelist_externals = 78 rm 79 sh 80 hg 81 python3 82deps = 83 httpie 84commands = 85 hg clean --all --dirs --files 86 rm -rf build dist .egg .egg-info 87 python3 setup.py sdist 88 sh -c "PACKAGE_NAME=$(python3 setup.py --name) && VERSION=$(python3 setup.py --version) && \ 89 cd dist && \ 90 tar xf $PACKAGE_NAME-$VERSION.tar.gz && \ 91 cd $PACKAGE_NAME-$VERSION && \ 92 cp -a {toxinidir}/debian . && \ 93 mk-origtargz --rename ../$PACKAGE_NAME-$VERSION.tar.gz && \ 94 dpkg-buildpackage -us -uc --no-check-builddeps --build=source " 95 sh -c "cd dist && dcmd zip latest.zip *.changes" 96 http -f POST https://{env:JENKINS_USER}:{env:JENKINS_TOKEN}@jenkins.intra.logilab.fr/job/pkg-from-dsc/buildWithParameters DIST=buster source.zip@dist/latest.zip REPO=buster PUBLISH=true 97 98[testenv:yamllint] 99skip_install = true 100deps = yamllint 101commands = 102 yamllint . 103