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