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
|
requires = ["tox>=4.45"]
env_list = [
"3.13",
"3.12",
"3.11",
"3.10",
"3.9",
"lint",
"docs",
"man",
]
skip_missing_interpreters = true
[env_run_base]
description = "run tests with {env_name}"
package = "wheel"
dependency_groups = ["test"]
set_env.COVERAGE_FILE = "{work_dir}{/}.coverage.{env_name}"
commands = [
[
"pytest",
{replace = "posargs", default = [
"--cov=pipx",
"--cov-report=term-missing:skip-covered",
"--cov-report=xml:{work_dir}{/}coverage.{env_name}.xml",
"-n", "auto",
"--dist", "loadfile",
"tests",
], extend = true},
],
]
uv_seed = true
[env.dev]
description = "generate a DEV environment"
package = "editable"
dependency_groups = ["dev"]
commands = [
["uv", "pip", "tree"],
["python", "-c", "import sys; print(sys.executable)"],
]
[env.lint]
description = "run pre-commit on the codebase"
skip_install = true
dependency_groups = ["lint"]
commands = [["pre-commit", "run", "--all-files"]]
[env.docs]
description = "build documentation"
dependency_groups = ["docs"]
commands = [
["mkdocs", "build", "--strict", "--site-dir", "{env:READTHEDOCS_OUTPUT:site}{/}html"],
]
[env.man]
description = "build man page"
dependency_groups = ["man"]
commands = [
["python", "scripts/generate_man.py"],
]
[env.zipapp]
description = "build zipapp via shiv"
skip_install = true
dependency_groups = ["zipapp"]
allowlist_externals = ["{tox_root}{/}pipx.pyz"]
commands = [
["shiv", "-c", "pipx", "-o", "{tox_root}{/}pipx.pyz", "."],
["{tox_root}{/}pipx.pyz", "--version"],
]
|