-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
200 lines (156 loc) · 6.03 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
# PEP 518/517, 621
[project]
name = "curldl"
dynamic = ["version"]
description = "Safely and reliably download files with PycURL"
keywords = ["cURL", "PycURL", "download"]
readme = "README.md"
license = {text = "LGPL-3.0-or-later"}
authors = [{name = "Michael Orlov", email = "[email protected]"}]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"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",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Internet :: File Transfer Protocol (FTP)",
"Topic :: System :: Networking"
]
requires-python = ">=3.8"
dependencies = [
"pycurl>=7.44.0", # PycURL wrapper for cURL library
"pycurl>=7.45.2; python_version>='3.13'", # need Py_TRASHCAN_SAFE_END fix
"pycurl<7.45.2; implementation_name=='pypy'", # need Py_TRASHCAN_BEGIN
"tenacity>=6.2.0", # retry policies
"tqdm>=4.50.0" # console progress bar
]
[project.optional-dependencies]
minimal = [
"pycurl==7.44.0; python_version<'3.13'", # need CURLINFO_CONDITION_UNMET
"pycurl==7.45.2; python_version>='3.13'", # need Py_TRASHCAN_SAFE_END fix
"tenacity==6.2.0", # need type hinting and no-warnings asyncio (also requires six)
"tqdm==4.50.0" # need colour parameter (also requires colorama on win32)
]
test = [
"bandit[toml]>=1.7.5", # security issues checks
"mypy>=0.981", # type hinting verifier
"pycurl<7.45; implementation_name=='pypy'", # JIT-related bug when testing
"pytest", # pytest testing framework
"pytest-black-ng", # code formatter (--black)
"pytest-cov", # code coverage (--cov)
"pytest-httpserver", # HTTP server fixture
"pytest-isort", # imports sorter (--isort)
"pytest-mock", # mocker fixtures for monkey patching
"pytest-mypy", # type hinting verifier (--mypy)
"pytest-pylint", # static code analysis (--pylint)
"pytest-repeat", # repeating tests (@pytest.mark.repeat)
"pytest-sugar>=0.9.7", # look-and-feel for pytest progress
"pytest-xdist[psutil]", # distributed tests (-n logical --no-pylint)
"types-pycurl", # external type annotations: pycurl
"types-tqdm" # external type annotations: tqdm
]
dev = [
"build", # packaging build frontend
"ipython", # interactive Python environment
"pipdeptree", # show packages dependency tree
"pip-autoremove", # remove unused package dependencies
"pip-review", # upgrade outdated packages
"pycparser; implementation_name=='pypy'", # needed for pip check
"towncrier", # producing changelogs
"twine", # PyPI package publishing
"wheel", # build system (also downloaded during build)
"setuptools-scm[toml]" # git tags-based versioning (also downloaded during build)
]
doc = [
"myst-parser[linkify]", # Markdown MyST parser
"sphinx>=7", # documentation generator
"sphinx-copybutton", # "copy" button for code blocks
"furo" # Sphinx HTML theme
]
[project.urls]
"Homepage" = "https://github.com/noexec/curldl"
"Documentation" = "https://curldl.readthedocs.io/"
"Bug Tracker" = "https://github.com/noexec/curldl/issues"
"Changelog" = "https://github.com/noexec/curldl/blob/develop/docs/CHANGELOG.md"
[project.scripts]
curldl = "curldl.cli:main"
[build-system]
requires = ["setuptools>=45", "setuptools-scm[toml]>=6.2", "wheel"]
build-backend = "setuptools.build_meta"
[tool.setuptools.package-data]
"curldl" = ["py.typed"] # PEP 561
[tool.setuptools_scm]
version_scheme = "no-guess-dev"
write_to = "src/curldl/_version.py"
[tool.towncrier]
directory = "docs/changelog.d"
filename = "docs/CHANGELOG.md"
title_format = "curldl {version} ({project_date})"
issue_format = "[#{issue}](https://github.com/noexec/curldl/pull/{issue})"
[tool.pytest.ini_options]
addopts = "--mypy --pylint --black --isort --cov --cov-report=term --cov-report=html --cov-report=xml"
testpaths = ["tests", "src"] # "src" required for pylint and mypy (whereas cov considers imported files)
cache_dir = "build/tests/pytest_cache"
[tool.pylint.main]
py-version = "3.8"
ignore-paths = ["src/curldl/_version.py"]
extension-pkg-allow-list = ["pycurl"]
[tool.pylint.format]
expected-line-ending-format = "LF"
max-line-length = 88
[tool.pylint.basic]
good-names-rgxs = "^(dl)$"
[tool.pylint.design]
min-public-methods = 1
max-args = 15
max-positional-arguments = 10
max-attributes = 15
max-locals = 20
[tool.pylint.miscellaneous]
notes = ["FIXME", "XXX"]
[tool.mypy]
warn_unused_configs = true
cache_dir = "build/tests/mypy_cache"
allow_redefinition = true
warn_unreachable = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
disallow_untyped_decorators = true
warn_incomplete_stub = true
disallow_any_explicit = true
disallow_any_generics = true
disallow_subclassing_any = true
warn_return_any = true
[tool.black]
exclude = '[\\/]_version\.py$'
[tool.isort]
known_first_party = ["curldl"]
profile = "black"
[tool.coverage.run]
data_file = "build/tests/coverage.sqlite"
omit = ["/etc/*"]
branch = true
dynamic_context = "test_function"
[tool.coverage.report]
fail_under = 100
show_missing = true
skip_covered = true
[tool.coverage.html]
directory = "build/tests/coverage"
show_contexts = true
skip_covered = false
[tool.coverage.xml]
output = "build/tests/coverage/coverage.xml"
[tool.bandit]
skips = ["B101"]