forked from pdm-project/pdm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
255 lines (230 loc) · 6.13 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
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"
[project]
# PEP 621 project metadata
# See https://www.python.org/dev/peps/pep-0621/
name = "pdm"
description = "A modern Python package and dependency manager supporting the latest PEP standards"
authors = [
{name = "Frost Ming", email = "[email protected]"},
]
dynamic = ["version"]
requires-python = ">=3.8"
license = {text = "MIT"}
dependencies = [
"blinker",
"packaging>=20.9,!=22.0",
"platformdirs",
"rich>=12.3.0",
"virtualenv>=20",
"pyproject-hooks",
"unearth>=0.15.0",
"dep-logic>=0.2.0,<1.0",
"findpython>=0.6.0,<1.0.0a0",
"tomlkit>=0.11.1,<1",
"shellingham>=1.3.2",
"python-dotenv>=0.15",
"resolvelib>=1.0.1",
"installer<0.8,>=0.7",
"truststore; python_version >= \"3.10\"",
"tomli>=1.1.0; python_version < \"3.11\"",
"importlib-resources>=5; python_version < \"3.9\"",
"importlib-metadata>=3.6; python_version < \"3.10\"",
"hishel>=0.0.24,<0.1.0",
"msgpack>=1.0",
"pbs-installer[install]",
"httpx[socks]<1,>0.20",
]
readme = "README.md"
keywords = ["packaging", "dependency", "workflow"]
classifiers = [
"Topic :: Software Development :: Build Tools",
"Programming Language :: Python :: 3",
"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",
]
[project.urls]
Homepage = "https://pdm-project.org"
Repository = "https://github.com/pdm-project/pdm"
Documentation = "https://pdm-project.org"
Changelog = "https://pdm-project.org/latest/dev/changelog/"
[project.optional-dependencies]
pytest = [
"pytest",
"pytest-mock",
]
copier = ["copier>=8.0.0"]
cookiecutter = ["cookiecutter"]
keyring = ["keyring"]
template = [
"pdm[copier,cookiecutter]",
]
all = [
"pdm[keyring,template]",
]
[project.scripts]
pdm = "pdm.core:main"
[tool.pdm.version]
source = "scm"
write_to = "pdm/models/VERSION"
[tool.pdm.build]
excludes = ["./**/.git"]
package-dir = "src"
includes = ["src/pdm"]
source-includes = ["tests", "CHANGELOG.md", "LICENSE", "README.md", "tox.ini"]
# editables backend doesn't work well with namespace packages
editable-backend = "path"
[tool.pdm.scripts]
pre_release = "python tasks/max_versions.py"
release = "python tasks/release.py"
test = "pytest"
coverage = {shell = """\
python -m pytest \
--verbosity=3 \
--cov=src/pdm \
--cov-branch \
--cov-report term-missing \
tests/
"""}
tox = "tox"
doc = {cmd = "mkdocs serve", help = "Start the dev server for docs preview"}
lint = "pre-commit run --all-files"
complete = {call = "tasks.complete:main", help = "Create autocomplete files for bash and fish"}
[tool.pdm.dev-dependencies]
test = [
"pdm[pytest]",
"pytest-cov",
"pytest-xdist>=1.31.0",
"pytest-rerunfailures>=10.2",
"pytest-httpserver>=1.0.6",
]
tox = [
"tox",
"tox-pdm>=0.5",
]
doc = [
"mkdocs>=1.1",
"mkdocs-material>=7.3",
"mkdocstrings[python]>=0.18",
"setuptools>=62.3.3",
"markdown-exec>=0.7.0",
"mkdocs-redirects>=1.2.0",
"mkdocs-version-annotations>=1.0.0",
]
workflow = [
"pdm-pep517>=1.0.0,<2.0.0",
"parver>=0.3.1",
"towncrier>=20",
"pycomplete~=0.3"
]
[tool.ruff]
line-length = 120
exclude = ["tests/fixtures"]
target-version = "py38"
src = ["src"]
[tool.ruff.lint]
extend-select = [
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"PGH", # pygrep-hooks
"RUF", # ruff
"W", # pycodestyle
"YTT", # flake8-2020
]
extend-ignore = ["B018", "B019", "RUF018"]
[tool.ruff.lint.mccabe]
max-complexity = 10
[tool.ruff.lint.isort]
known-first-party = ["pdm"]
[tool.towncrier]
package = "pdm"
filename = "CHANGELOG.md"
issue_format = "[#{issue}](https://github.com/pdm-project/pdm/issues/{issue})"
directory = "news/"
title_format = "Release v{version} ({project_date})"
template = "news/towncrier_template.md"
underlines = "-~^"
[[tool.towncrier.type]]
directory = "break"
name = "Breaking Changes"
showcontent = true
[[tool.towncrier.type]]
directory = "feature"
name = "Features & Improvements"
showcontent = true
[[tool.towncrier.type]]
directory = "bugfix"
name = "Bug Fixes"
showcontent = true
[[tool.towncrier.type]]
directory = "doc"
name = "Documentation"
showcontent = true
[[tool.towncrier.type]]
directory = "dep"
name = "Dependencies"
showcontent = true
[[tool.towncrier.type]]
directory = "removal"
name = "Removals and Deprecations"
showcontent = true
[[tool.towncrier.type]]
directory = "misc"
name = "Miscellany"
showcontent = true
[tool.pytest.ini_options]
filterwarnings = [
"ignore::DeprecationWarning"
]
markers = [
"network: Tests that require network",
"integration: Run with all Python versions",
"path: Tests that compare with the system paths",
"deprecated: Tests about deprecated features",
]
addopts = "-r aR"
testpaths = [
"tests/",
]
[tool.codespell]
ignore-words-list = "ba,overriden,te"
[tool.coverage.run]
branch = true
source = ["pdm/"]
omit = [
"pdm/__main__.py",
"pdm/pep582/sitecustomize.py",
"pdm/models/in_process/*.py",
"pdm/models/setup.py",
"*/pdm-test-*-env/*",
]
[tool.coverage.report]
# Regexes for lines to exclude from consideration
exclude_lines = [
"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 __name__ == .__main__.:",
"if TYPE_CHECKING:",
]
ignore_errors = true
[tool.mypy]
follow_imports = "silent"
ignore_missing_imports = true
disallow_incomplete_defs = true
disallow_untyped_defs = true
disallow_untyped_decorators = true
exclude = "pdm/(pep582/|models/in_process/.+\\.py)"
namespace_packages = true
mypy_path = "src"
explicit_package_bases = true