2 requires = ["hatchling"]
3 build-backend = "hatchling.build"
8 {name = "pukkandan", email = "pukkandan.ytdlp@gmail.com"},
9 {name = "Grub4K", email = "contact@grub4k.xyz"},
10 {name = "bashonly", email = "bashonly@protonmail.com"},
11 {name = "coletdjnz", email = "coletdjnz@protonmail.com"},
13 description = "A feature-rich command-line audio/video downloader"
15 requires-python = ">=3.8"
24 license = {file = "LICENSE"}
26 "Topic :: Multimedia :: Video",
27 "Development Status :: 5 - Production/Stable",
28 "Environment :: Console",
29 "Programming Language :: Python",
30 "Programming Language :: Python :: 3 :: Only",
31 "Programming Language :: Python :: 3.8",
32 "Programming Language :: Python :: 3.9",
33 "Programming Language :: Python :: 3.10",
34 "Programming Language :: Python :: 3.11",
35 "Programming Language :: Python :: 3.12",
36 "Programming Language :: Python :: Implementation",
37 "Programming Language :: Python :: Implementation :: CPython",
38 "Programming Language :: Python :: Implementation :: PyPy",
39 "License :: OSI Approved :: The Unlicense (Unlicense)",
40 "Operating System :: OS Independent",
44 "brotli; implementation_name=='cpython'",
45 "brotlicffi; implementation_name!='cpython'",
49 "requests>=2.31.0,<3",
50 "urllib3>=1.26.17,<3",
54 [project.optional-dependencies]
56 curl-cffi = ["curl-cffi==0.5.10; implementation_name=='cpython'"]
70 "yt-dlp[static-analysis]",
81 "pyinstaller>=6.7.0", # for compat with setuptools>=70
89 Documentation = "https://github.com/yt-dlp/yt-dlp#readme"
90 Repository = "https://github.com/yt-dlp/yt-dlp"
91 Tracker = "https://github.com/yt-dlp/yt-dlp/issues"
92 Funding = "https://github.com/yt-dlp/yt-dlp/blob/master/Collaborators.md#collaborators"
95 yt-dlp = "yt_dlp:main"
97 [project.entry-points.pyinstaller40]
98 hook-dirs = "yt_dlp.__pyinstaller:get_hook_dirs"
100 [tool.hatch.build.targets.sdist]
105 "/.gitignore", # included by default, needed for auto-excludes
107 "/LICENSE", # included as license
108 "/pyproject.toml", # included by default
109 "/README.md", # included as readme
111 "/supportedsites.md",
114 "/yt_dlp/extractor/lazy_extractors.py",
116 "/AUTHORS", # included by default
121 [tool.hatch.build.targets.wheel]
122 packages = ["yt_dlp"]
123 artifacts = ["/yt_dlp/extractor/lazy_extractors.py"]
125 [tool.hatch.build.targets.wheel.shared-data]
126 "completions/bash/yt-dlp" = "share/bash-completion/completions/yt-dlp"
127 "completions/zsh/_yt-dlp" = "share/zsh/site-functions/_yt-dlp"
128 "completions/fish/yt-dlp.fish" = "share/fish/vendor_completions.d/yt-dlp.fish"
129 "README.txt" = "share/doc/yt_dlp/README.txt"
130 "yt-dlp.1" = "share/man/man1/yt-dlp.1"
133 path = "yt_dlp/version.py"
134 pattern = "_pkg_version = '(?P<version>[^']+)'"
136 [tool.hatch.envs.default]
137 features = ["curl-cffi", "default"]
138 dependencies = ["pre-commit"]
142 [tool.hatch.envs.default.scripts]
143 setup = "pre-commit install --config .pre-commit-hatch.yaml"
144 yt-dlp = "python -Werror -Xdev -m yt_dlp {args}"
146 [tool.hatch.envs.hatch-static-analysis]
148 features = ["static-analysis"]
149 dependencies = [] # override hatch ruff version
150 config-path = "pyproject.toml"
152 [tool.hatch.envs.hatch-static-analysis.scripts]
153 format-check = "autopep8 --diff {args:.}"
154 format-fix = "autopep8 --in-place {args:.}"
155 lint-check = "ruff check {args:.}"
156 lint-fix = "ruff check --fix {args:.}"
158 [tool.hatch.envs.hatch-test]
161 "pytest-randomly~=3.15",
162 "pytest-rerunfailures~=14.0",
163 "pytest-xdist[psutil]~=3.5",
166 [tool.hatch.envs.hatch-test.scripts]
167 run = "python -m devscripts.run_tests {args}"
168 run-cov = "echo Code coverage not implemented && exit 1"
170 [[tool.hatch.envs.hatch-test.matrix]]
187 "E402", # module level import not at top of file
188 "E501", # line too long
189 "E731", # do not assign a lambda expression, use a def
190 "E741", # ambiguous variable name
193 "E", # pycodestyle errors
194 "W", # pycodestyle warnings
199 [tool.ruff.lint.per-file-ignores]
200 "devscripts/lazy_load_template.py" = ["F401"]
201 "!yt_dlp/extractor/**.py" = ["I"]
203 [tool.ruff.lint.isort]
204 known-first-party = [
209 relative-imports-order = "closest-to-furthest"
212 max_line_length = 120
273 [tool.pytest.ini_options]
274 addopts = "-ra -v --strict-markers"