| 1 | [tox] |
| 2 | isolated_build = True |
| 3 | envlist = |
| 4 | lint |
| 5 | py38,py39,py310,py311,py312,py313,py314 |
| 6 | docs |
| 7 | audit |
| 8 | |
| 9 | [testenv] |
| 10 | # Python 3.8 only: modern virtualenv seeds pip 26 / setuptools 82 into the env, |
| 11 | # but pip 26 refuses to run on 3.8 and setuptools 82 dropped pkg_resources |
| 12 | # (which zope.testrunner 6.6.1 -- the last 3.8-compatible release -- imports). |
| 13 | # Pin the seeded pip and cap setuptools on 3.8 so pkg_resources stays available. |
| 14 | # 3.9+ need neither: pip 26 runs there and zope.testrunner 8.x drops pkg_resources. |
| 15 | # These are no-ops under tox-uv and on CI (focal ships compatible tooling). |
| 16 | set_env = |
| 17 | py38: VIRTUALENV_PIP = 24.3.1 |
| 18 | deps = |
| 19 | .[test] |
| 20 | py38: setuptools < 81 |
| 21 | zope.testrunner |
| 22 | commands = |
| 23 | zope-testrunner --test-path src --tests-pattern ^tests {posargs} |
| 24 | |
| 25 | [testenv:lint] |
| 26 | # align with .launchpad.yaml |
| 27 | basepython = python3.12 |
| 28 | skip_install = true |
| 29 | deps = |
| 30 | pre-commit |
| 31 | commands = |
| 32 | pre-commit run --all-files |
| 33 | |
| 34 | [testenv:docs] |
| 35 | # align with .launchpad.yaml |
| 36 | basepython = python3.12 |
| 37 | deps = |
| 38 | .[docs] |
| 39 | commands = |
| 40 | sphinx-build -b html -d src/lazr/uri/docs/_build/doctrees src/lazr/uri/docs src/lazr/uri/docs/_build/html |
| 41 | |
| 42 | [testenv:audit] |
| 43 | # align with .launchpad.yaml |
| 44 | basepython = python3.12 |
| 45 | deps = |
| 46 | pip>=26.0 |
| 47 | pip-audit |
| 48 | commands = |
| 49 | pip-audit |