Files
py-libp2p/tox.ini
2023-05-03 14:20:55 -06:00

88 lines
2.0 KiB
INI

[tox]
envlist=
py{37,38,39,310,311}-core
py{37,38,39,310,311}-lint
py{37,38,39,310,311}-wheel
py311-wheel-windows
docs
[isort]
combine_as_imports=True
force_grid_wrap=1
force_sort_within_sections=True
known_third_party=hypothesis,pytest
known_first_party=<MODULE_NAME>
multi_line_output=3
profile=black
[flake8]
max-line-length=88
exclude=venv*,.tox,docs,build
extend-ignore=E203
[testenv]
usedevelop=True
commands=
core: pytest {posargs:tests/core}
docs: make check-docs
basepython=
docs: python
py37: python3.7
py38: python3.8
py39: python3.9
py310: python3.10
py311: python3.11
extras=
test
docs
allowlist_externals=make
[common-lint]
basepython=python
extras=lint
allowlist_externals=black
commands=
mypy -p <MODULE_NAME> --config-file {toxinidir}/mypy.ini
flake8 {toxinidir}/<MODULE_NAME> {toxinidir}/tests
isort --check-only --diff {toxinidir}/<MODULE_NAME> {toxinidir}/tests
pydocstyle --explain {toxinidir}/<MODULE_NAME> {toxinidir}/tests
black --check {toxinidir}/<MODULE_NAME> {toxinidir}/docs {toxinidir}/tests {toxinidir}/setup.py
[testenv:lint]
basepython: python
extras: {[common-lint]extras}
commands: {[common-lint]commands}
[testenv:py{37,38,39,310,311}-lint]
extras: {[common-lint]extras}
commands: {[common-lint]commands}
[testenv:py{37,38,39,310,311}-wheel]
deps=
wheel
build[virtualenv]
allowlist_externals=
/bin/rm
/bin/bash
commands=
python -m pip install --upgrade pip
/bin/rm -rf build dist
python -m build
/bin/bash -c 'python -m pip install --upgrade "$(ls dist/<MODULE_NAME>-*-py3-none-any.whl)" --progress-bar off'
python -c "import <MODULE_NAME>"
skip_install=true
[testenv:py311-wheel-windows]
deps=
wheel
build[virtualenv]
allowlist_externals=
bash.exe
commands=
python -m pip install --upgrade pip
bash.exe -c "rm -rf build dist"
python -m build
bash.exe -c 'python -m pip install --upgrade "$(ls dist/<MODULE_NAME>-*-py3-none-any.whl)" --progress-bar off'
python -c "import <MODULE_NAME>"
skip_install=true