[tox] envlist= py{310,311,312,313}-core py{310,311,312,313}-lint py{310,311,312,313}-wheel py{310,311,312,313}-interop py{310,311,312,313}-attack-simulation windows-wheel docs [flake8] exclude=venv*,.tox,docs,build,*_pb2*.py extend-ignore=E203 max-line-length=88 per-file-ignores=__init__.py:F401 [testenv] usedevelop=True commands_pre= uv pip install --upgrade pip uv pip install --group dev -e . commands= core: pytest -n auto --timeout=1200 --durations=40 --durations-min=1.0 {posargs:tests/core} demos: pytest -n auto --timeout=1200 --durations=40 --durations-min=1.0 {posargs:tests/examples} docs: make check-docs-ci interop: pytest -n auto --timeout=1200 --durations=40 --durations-min=1.0 {posargs:tests/interop} utils: pytest -n auto --timeout=1200 --durations=40 --durations-min=1.0 {posargs:tests/utils} basepython= docs: python windows-wheel: python py310: python3.10 py311: python3.11 py312: python3.12 py313: python3.13 allowlist_externals= make pre-commit uv [testenv:py{310,311,312,313}-lint] deps=pre-commit setenv = PYTHONPATH={envsitepackagesdir}{:}{env:PYTHONPATH:} commands= pre-commit install pre-commit run --all-files --show-diff-on-failure [testenv:py{310,311,312,313}-interop] deps = redis>=4.0.0 [testenv:py{310,311,312,313}-wheel] deps= wheel build[virtualenv] allowlist_externals= /bin/rm /bin/bash uv commands= uv pip install --upgrade pip /bin/rm -rf build dist python -m build /bin/bash -c 'uv pip install --upgrade "$(ls dist/libp2p-*-py3-none-any.whl)" --no-progress' python -c "import libp2p" skip_install=true [testenv:windows-wheel] deps= wheel build[virtualenv] allowlist_externals= bash.exe uv commands= python --version uv pip install --upgrade pip bash.exe -c "rm -rf build dist" python -m build bash.exe -c 'uv pip install --upgrade "$(ls dist/libp2p-*-py3-none-any.whl)" --no-progress' python -c "import libp2p" skip_install=true