-
-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathpyproject.toml
216 lines (189 loc) · 4.95 KB
/
pyproject.toml
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
[build-system]
requires = ['setuptools>=61.0.0']
build-backend = "setuptools.build_meta"
[project]
name = "pythonfinder"
description = "A cross-platform python discovery tool to help locate python on any system."
authors = [{name = "Dan Ryan", email = "[email protected]"}]
readme = "README.rst"
license = {text = "MIT"}
keywords = [
"pythonfinder",
"path",
"finder",
"pathfinder",
"which",
"pep514",
"pyenv",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Software Development :: Build Tools",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Utilities",
]
dynamic = ["version"]
requires-python = ">=3.8"
dependencies = [
"packaging>=22.0",
]
[project.optional-dependencies]
cli = ["click"]
tests = [
"pytest",
"pytest-timeout",
"coverage[toml]",
]
dev = [
"parver",
"build",
"invoke",
"twine",
"lxml",
"pre-commit",
"towncrier",
]
[project.scripts]
pyfinder = "pythonfinder.cli:cli"
[project.urls]
Homepage = "https://github.com/sarugaku/pythonfinder"
[tool.setuptools]
zip-safe = true
package-data = { pythonfinder = ["LICENSE*", "README*"] }
package-dir = {"" = "src"}
license-files = ["LICENSE.txt"]
[tool.setuptools.dynamic]
version = {attr = "pythonfinder.__version__"}
[tool.setuptools.packages.find]
where = ["src"]
exclude = [
"tests",
"docs",
"tasks",
]
namespaces = false
[tool.pytest.ini_options]
addopts = "-ra"
testpaths = ["tests/"]
norecursedirs = [".*", "build", "dist", "news", "tasks", "docs"]
markers = [
"parse",
"is_python",
]
filterwarnings = [
"ignore::DeprecationWarning",
"ignore::PendingDeprecationWarning",
]
[tool.mypy]
ignore_missing_imports = true
follow_imports = "skip"
html_report = "mypyhtml"
python_version = "3.8"
[tool.black]
line-length = 90
[tool.ruff]
target-version = "py38"
fix = true
line-length = 90
select = [
"B", # flake8-bugbear
"E", # pycodestyle (flake8)
"F", # pyflakes (flake8)
"I", # isort
"PGH", # pygrep-hooks
"RUF", # Ruff u.a. yesqa
"TCH", # flake8-type-checking
"UP", # pyupgrade
"W", # pycodestyle (flake8)
]
ignore = [
"B904", # Within an `except` clause, raise exceptions with `raise ... from err` or `raise ... from None` to distinguish them from errors in exception handling
"E501", # line too long (flake8)
"PGH003", # Use specific rule codes when ignoring type issues
]
unfixable = [
"F841", # Local variable {x} is assigned to but never used (flake8)
]
[tool.ruff.per-file-ignores]
"__init__.py" = [
"F401", # module imported but unused (flake8)
"F403", # ‘from module import *’ used; unable to detect undefined names (flake8)
]
"docs/*" = [
"I",
]
[tool.ruff.flake8-type-checking]
runtime-evaluated-base-classes = [
"pythonfinder.models.common.FinderBaseModel",
"pythonfinder.models.mixins.PathEntry",
]
[tool.ruff.isort]
known-first-party = ["pythonfinder"]
required-imports = ["from __future__ import annotations"]
[tool.coverage.run]
branch = true
source = ["src/pythonfinder/"]
omit = ["src/pythonfinder/_vendor/*"]
[tool.coverage.report]
# Regexes for lines to exclude from consideration
exclude_lines = [
# Have to re-enable the standard pragma
"pragma: no cover",
# Don't complain about missing debug-only code:
"def __repr__",
"if self.debug",
# Don't complain if tests don't hit defensive assertion code:
"raise AssertionError",
"raise NotImplementedError",
# Don't complain if non-runnable code isn't run:
"if 0:",
"if __name__ == .__main__.:"
]
[tool.coverage.html]
directory = "htmlcov"
[tool.coverage.xml]
output = "coverage.xml"
[tool.towncrier]
package = "pythonfinder"
package_dir = "src"
filename = "CHANGELOG.rst"
issue_format = "`#{issue} <https://github.com/sarugaku/pythonfinder/issues/{issue}>`_"
directory = "news/"
title_format = "{version} ({project_date})"
template = 'tasks/CHANGELOG.rst.jinja2'
[[tool.towncrier.type]]
directory = "feature"
name = "Features & Improvements"
showcontent = true
[[tool.towncrier.type]]
directory = "behavior"
name = "Behavior Changes"
showcontent = true
[[tool.towncrier.type]]
directory = "bugfix"
name = "Bug Fixes"
showcontent = true
[[tool.towncrier.type]]
directory = "vendor"
name = "Vendored Libraries"
showcontent = true
[[tool.towncrier.type]]
directory = "docs"
name = "Improved Documentation"
showcontent = true
[[tool.towncrier.type]]
directory = "trivial"
name = "Trivial Changes"
showcontent = false
[[tool.towncrier.type]]
directory = "removal"
name = "Removals and Deprecations"
showcontent = true