forked from streamlink/streamlink
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
302 lines (269 loc) · 7.47 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
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
[build-system]
requires = [
"setuptools >=65.6",
"wheel",
# The versioningit build-requirement gets removed from the source distribution,
# as the version string is already built into it (see the onbuild versioningit hook):
"versioningit >=2.0.0,<4", # disabled in sdist
]
# setuptools build-backend override
# https://setuptools.pypa.io/en/stable/build_meta.html
backend-path = ["build_backend"]
build-backend = "__init__"
# https://peps.python.org/pep-0621/
# https://packaging.python.org/en/latest/specifications/declaring-project-metadata/
[project]
name = "streamlink"
description = """\
Streamlink is a command-line utility that extracts streams from various services and pipes them into a video player of choice.\
"""
readme = "README.md"
license = { text = "Simplified BSD" }
authors = [
{ name = "Streamlink" },
{ email = "[email protected]" }
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: BSD License",
"Environment :: Console",
"Intended Audience :: End Users/Desktop",
"Operating System :: POSIX",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
"Programming Language :: Python :: 3",
"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 :: Internet :: WWW/HTTP",
"Topic :: Multimedia :: Sound/Audio",
"Topic :: Multimedia :: Video",
"Topic :: Utilities",
]
dynamic = [
"version",
"entry-points",
"scripts",
"gui-scripts",
]
requires-python = ">=3.8"
dependencies = [
"certifi",
"exceptiongroup ; python_version<'3.11'",
"isodate",
"lxml >=4.6.4,<6",
"pycountry",
"pycryptodome >=3.4.3,<4",
"PySocks >=1.5.6,!=1.5.7",
"requests >=2.26.0,<3",
"trio >=0.22.0,<1",
"trio-websocket >=0.9.0,<1",
"typing-extensions >=4.0.0",
"urllib3 >=1.26.0,<3",
"websocket-client >=1.2.1,<2",
]
[project.urls]
Homepage = "https://github.com/streamlink/streamlink"
Documentation = "https://streamlink.github.io/"
Tracker = "https://github.com/streamlink/streamlink/issues"
Source = "https://github.com/streamlink/streamlink"
Funding = "https://streamlink.github.io/latest/donate.html"
# https://setuptools.pypa.io/en/stable/userguide/pyproject_config.html
# https://setuptools.pypa.io/en/stable/userguide/package_discovery.html
# https://setuptools.pypa.io/en/stable/userguide/datafiles.html
[tool.setuptools]
license-files = ["LICENSE"]
[tool.setuptools.packages.find]
where = ["src"]
namespaces = false
[tool.setuptools.package-data]
streamlink = [
"py.typed",
]
"streamlink.plugins" = [
"_plugins.json",
]
# https://versioningit.readthedocs.io/en/stable/index.html
[tool.versioningit]
# Packagers: don't patch the `default-version` string while using the tarball built by GitHub from the tagged git commit!
# Instead, use Streamlink's signed source distribution as package source, which has the correct version string built in.
# This fallback `default-version` string is only used when not building from the sdist or a git repo with at least one tag.
# See the versioningit comment at the very top of this file!
default-version = "0.0.0+unknown"
[tool.versioningit.vcs]
method = "git"
[tool.versioningit.format]
distance = "{base_version}+{distance}.{vcs}{rev}"
dirty = "{base_version}+{distance}.{vcs}{rev}.dirty"
distance-dirty = "{base_version}+{distance}.{vcs}{rev}.dirty"
[tool.versioningit.next-version]
method = "null"
[tool.versioningit.onbuild]
# When building the sdist or wheel, remove versioningit build-requirement and set the static version string
method = { module = "build_backend.onbuild", value = "onbuild" }
# https://docs.pytest.org/en/latest/reference/customize.html#configuration
# https://docs.pytest.org/en/latest/reference/reference.html#ini-options-ref
[tool.pytest.ini_options]
testpaths = [
"build_backend",
"tests",
]
filterwarnings = [
"always",
]
# https://pytest-asyncio.readthedocs.io/en/v0.24.0/reference/configuration.html
asyncio_mode = "strict"
asyncio_default_fixture_loop_scope = "function"
# https://coverage.readthedocs.io/en/latest/config.html
[tool.coverage.run]
branch = true
source = [
"build_backend",
"src",
"tests",
]
[tool.coverage.report]
omit = [
"build_backend/commands.py",
"src/streamlink/packages/*",
"src/streamlink/webbrowser/cdp/devtools/*",
"src/streamlink_cli/packages/*",
"src/streamlink_cli/_parser.py",
]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise NotImplementedError",
"if __name__ == \"__main__\":",
"if (?:typing\\.)?TYPE_CHECKING:",
]
# https://docs.astral.sh/ruff/configuration/
[tool.ruff]
src = [
"build_backend",
"src",
"tests",
]
target-version = "py38"
fix = false
line-length = 128
output-format = "full"
preview = true
extend-exclude = [
"docs/conf.py",
"src/streamlink/packages/",
"src/streamlink_cli/packages/",
]
[tool.ruff.format]
preview = true
line-ending = "lf"
quote-style = "double"
skip-magic-trailing-comma = false
exclude = [
"src/streamlink/session/http_useragents.py",
"src/streamlink/webbrowser/cdp/devtools/*.py",
]
[tool.ruff.lint]
select = [
# pycodestyle
"E",
"W",
# pyflakes
"F",
# pylint
"PLC",
"PLE",
"PLW",
# isort
"I",
# flake8-async
"ASYNC",
# flake8-builtins
"A",
# flake8-bugbear
"B",
# flake8-commas
"COM",
# flake8-comprehensions
"C4",
# flake8-datetimez
"DTZ",
# flake8-implicit-str-concat
"ISC",
# flake8-no-pep420
"INP",
# flake8-logging
"LOG",
# flake8-pie
"PIE",
# flake8-print
"T20",
# flake8-pytest-style
"PT",
# flake8-quotes
"Q",
# flake8-tidy-imports
"TID",
# Ruff-specific rules
"RUF",
]
ignore = [
"A003", # builtin-attribute-shadowing
"A005", # builtin-module-shadowing
"ASYNC109", # async-function-with-timeout
"C408", # unnecessary-collection-call
"ISC003", # explicit-string-concatenation
"PLC1901", # compare-to-empty-string
"PLC2801", # unnecessary-dunder-call
"PLW2901", # redefined-loop-name
"RUF021", # parenthesize-chained-operators
"RUF022", # unsorted-dunder-all
"RUF027", # missing-f-string-syntax
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]
"docs/**" = ["INP", "RUF012"]
"script/**" = ["INP"]
"src/streamlink/__init__.py" = ["I"]
"src/streamlink/_version.py" = ["I"]
"src/streamlink/plugins/*" = ["RUF012"]
"src/streamlink/session/http_useragents.py" = ["E501"]
"src/streamlink/webbrowser/cdp/devtools/*" = ["E303", "E501", "F401"]
"src/streamlink_cli/main.py" = ["PLW0603"]
"tests/**" = ["RUF012"]
[tool.ruff.lint.isort]
known-first-party = ["streamlink", "streamlink_cli"]
lines-after-imports = 2
combine-as-imports = true
[tool.ruff.lint.flake8-builtins]
builtins-ignorelist = [
"BaseExceptionGroup", # compat import from exceptiongroup pkg
"ExceptionGroup", # compat import from exceptiongroup pkg
]
[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "all"
[tool.ruff.lint.flake8-pytest-style]
fixture-parentheses = true
mark-parentheses = true
[tool.ruff.lint.flake8-quotes]
avoid-escape = false
[tool.ruff.lint.flake8-implicit-str-concat]
allow-multiline = false
# https://mypy.readthedocs.io/en/stable/config_file.html
[tool.mypy]
python_version = 3.8
show_error_codes = true
show_error_context = true
show_column_numbers = true
warn_no_return = false
files = [
"build_backend",
"src/streamlink/",
"src/streamlink_cli/",
"tests/",
"setup.py",
]