-
Notifications
You must be signed in to change notification settings - Fork 602
Expand file tree
/
Copy pathpyproject.toml
More file actions
228 lines (220 loc) · 7.79 KB
/
Copy pathpyproject.toml
File metadata and controls
228 lines (220 loc) · 7.79 KB
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
[build-system]
build-backend = "hatchling.build"
requires = [
"docutils>=0.21",
"hatch-vcs>=0.4",
"hatchling>=1.27",
]
[project]
name = "pipx"
description = "Install and Run Python Applications in Isolated Environments"
readme = "docs/README.md"
keywords = [
"cli",
"install",
"pip",
"Virtual Environment",
"workflow",
]
license = "MIT"
license-files = [ "LICENSE" ]
authors = [
{ name = "Chad Smith", email = "chadsmith.software@gmail.com" },
]
requires-python = ">=3.10"
classifiers = [
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3.15",
]
dynamic = [
"version",
]
dependencies = [
"argcomplete>=1.9.4",
"colorama>=0.4.4; sys_platform=='win32'",
"filelock>=3.16",
"packaging>=26",
"platformdirs>=4.6",
"tomli; python_version<'3.11'",
"userpath>=1.6,!=1.9",
]
optional-dependencies.uv = [
"uv>=0.9.17",
]
urls."Issue Tracker" = "https://github.com/pypa/pipx/issues"
urls."Release Notes" = "https://pipx.pypa.io/latest/changelog.html"
urls."Source Code" = "https://github.com/pypa/pipx"
urls.Documentation = "https://pipx.pypa.io"
urls.Homepage = "https://pipx.pypa.io"
scripts.pipx = "pipx.main:cli"
[dependency-groups]
dev = [
{ include-group = "docs" },
{ include-group = "lint" },
{ include-group = "man" },
{ include-group = "test" },
{ include-group = "type" },
]
test = [
"docutils>=0.21",
"pypiserver[cache,passlib]>=2.3.2",
"pytest>=8",
"pytest-cov>=4",
"pytest-mock>=3.11.1",
"pytest-subprocess>=1.5.4",
"pytest-xdist>=3.5",
"setuptools>=68; python_version>='3.12'",
"watchdog>=4",
]
type = [
"gitpython>=3.1",
"hatchling>=1.27",
"tomli>=2",
"ty>=0.0.59",
"types-docutils>=0.21",
{ include-group = "docs" },
{ include-group = "test" },
]
docs = [
"furo>=2024.8.6",
"sphinx>=8.1",
"sphinx-argparse-cli>=1.19", # generate the CLI reference from pipx's argparse parser so it cannot drift
"sphinx-autodoc-typehints>=2.5",
"sphinx-codeautolink>=0.15", # link the names in code blocks to the reference
"sphinx-copybutton>=0.5.2",
"sphinx-design>=0.6", # the card grid on the landing page
"sphinx-issues>=5", # the :issue:/:pr: roles used in the changelog and notes
"sphinx-last-updated-by-git>=0.3.8",
"sphinx-llm>=0.4.1,!=1.1",
"sphinx-notfound-page>=1", # a versioned 404 page
"sphinx-reredirects>=0.1.5", # keep old MkDocs URLs alive after the move to Sphinx
"sphinx-sitemap>=2.6", # emit sitemap.xml for crawlers
"sphinxcontrib-mermaid>=1", # the .. mermaid:: directive used across the explanation diagrams
"sphinxcontrib-towncrier>=0.5.0a0", # render unreleased news fragments as a draft changelog section
"sphinxext-opengraph>=0.9", # OpenGraph tags for link previews
"towncrier>=23.6",
]
lint = [
"pre-commit>=3",
]
man = [
"docutils>=0.21",
]
zipapp = [
"shiv>=1.0.6",
]
[tool.hatch]
version.source = "vcs"
build.hooks.custom = {}
build.hooks.vcs.version-file = "src/pipx/version.py"
build.targets.wheel.shared-data = { "build/man" = "share/man/man1" }
build.targets.sdist.include = [
"/*.md",
"/docs/man",
"/hatch_build.py",
"/logo.png",
"/pipx_demo.gif",
"/src",
]
[tool.ruff]
line-length = 120
extend-exclude = [
"testdata",
]
format.preview = true
format.docstring-code-line-length = 100
format.docstring-code-format = true
lint.select = [
"ALL",
]
lint.ignore = [
"CPY", # no copyright header
"D", # ignore documentation for now
"docstring-missing-exception", # broken with sphinx docs
"docstring-missing-returns", # no restructuredtext support yet
"docstring-missing-yields", # no restructuredtext support yet
"hardcoded-bind-all-interfaces", # possible binding to all interfaces
"implicit-namespace-package", # no implicit namespaces here
"incorrect-blank-line-before-class", # `one-blank-line-before-class` and `no-blank-line-before-class` are incompatible
"missing-trailing-comma", # conflicts with formatter
"multi-line-summary-first-line", # `multi-line-summary-first-line` and `multi-line-summary-second-line` are incompatible
"non-empty-init-module", # `__init__` module should only contain docstrings and re-exports
"single-line-implicit-string-concatenation", # conflicts with formatter
"subprocess-without-shell-equals-true", # using subprocess is alright
"suspicious-subprocess-import", # using subprocess is alright
]
lint.per-file-ignores."src/pipx/venv.py" = [
"stdlib-module-shadowing", # module shadows the standard library
]
lint.per-file-ignores."tests/**/*.py" = [
"assert", # asserts allowed in tests
"D", # don't care about documentation in tests
"FBT", # don't care about booleans as positional arguments in tests
"implicit-namespace-package", # no implicit namespace
"magic-value-comparison", # magic value used in comparison
"pytest-fixture-autouse", # shared setup fixtures are meant to apply to every test
"subprocess-without-shell-equals-true", # subprocess call: check for execution of untrusted input
"too-many-arguments", # too many arguments to function definition
]
lint.isort = { known-first-party = [
"helpers",
"package_info",
"pipx",
], required-imports = [
"from __future__ import annotations",
] }
lint.mccabe.max-complexity = 15
lint.preview = true
[tool.codespell]
# case sensitive etc
ignore-regex = "\\b(UE|path/doesnt/exist)\\b"
# Ref: https://github.com/codespell-project/codespell#using-a-config-file
skip = ".git,*.pdf,*.svg,.nox,testdata,.mypy_cache"
check-hidden = true
[tool.ty]
src.include = [ "hatch_build.py", "scripts", "src", "tests" ]
environment.python-version = "3.10"
rules.unused-ignore-comment = "error"
[tool.pytest]
ini_options.minversion = "8"
ini_options.testpaths = [ "tests" ]
ini_options.addopts = [ "-ra", "--strict-config", "--strict-markers" ]
ini_options.markers = [
"all_packages: test install with maximum number of packages",
]
ini_options.filterwarnings = [
"error",
# importlib.metadata warns before returning None for a dist-info carrying no Name; venv_inspect handles that case
# and Python 3.15 turns it into the KeyError the code already catches
"ignore:Implicit None on return values is deprecated:DeprecationWarning",
]
ini_options.log_level = "INFO"
[tool.towncrier]
package = "pipx"
directory = "changelog.d"
filename = "docs/changelog.rst"
start_string = ".. towncrier release notes start\n"
title_format = "`{version} <https://github.com/pypa/pipx/tree/{version}>`_ - {project_date}"
issue_format = ":issue:`{issue}`"
underlines = [
"=",
"-",
"~",
]
type = [
# defining any custom type replaces towncrier's built-ins, so pipx's default set is repeated here with a
# performance type added, otherwise `*.performance.md` fragments are silently dropped from the changelog
{ directory = "feature", name = "Features", showcontent = true },
{ directory = "bugfix", name = "Bugfixes", showcontent = true },
{ directory = "performance", name = "Performance", showcontent = true },
{ directory = "doc", name = "Improved Documentation", showcontent = true },
{ directory = "removal", name = "Deprecations and Removals", showcontent = true },
{ directory = "misc", name = "Miscellaneous internal changes", showcontent = false },
]