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'"]
65 "setuptools>=66.1.0,<70",
70 "yt-dlp[static-analysis]",
81 "pyinstaller>=6.3; sys_platform!='darwin'",
82 "pyinstaller==5.13.2; sys_platform=='darwin'", # needed for curl_cffi
90 Documentation = "https://github.com/yt-dlp/yt-dlp#readme"
91 Repository = "https://github.com/yt-dlp/yt-dlp"
92 Tracker = "https://github.com/yt-dlp/yt-dlp/issues"
93 Funding = "https://github.com/yt-dlp/yt-dlp/blob/master/Collaborators.md#collaborators"
96 yt-dlp = "yt_dlp:main"
98 [project.entry-points.pyinstaller40]
99 hook-dirs = "yt_dlp.__pyinstaller:get_hook_dirs"
101 [tool.hatch.build.targets.sdist]
106 "/.gitignore", # included by default, needed for auto-excludes
108 "/LICENSE", # included as license
109 "/pyproject.toml", # included by default
110 "/README.md", # included as readme
112 "/supportedsites.md",
115 "/yt_dlp/extractor/lazy_extractors.py",
117 "/AUTHORS", # included by default
122 [tool.hatch.build.targets.wheel]
123 packages = ["yt_dlp"]
124 artifacts = ["/yt_dlp/extractor/lazy_extractors.py"]
126 [tool.hatch.build.targets.wheel.shared-data]
127 "completions/bash/yt-dlp" = "share/bash-completion/completions/yt-dlp"
128 "completions/zsh/_yt-dlp" = "share/zsh/site-functions/_yt-dlp"
129 "completions/fish/yt-dlp.fish" = "share/fish/vendor_completions.d/yt-dlp.fish"
130 "README.txt" = "share/doc/yt_dlp/README.txt"
131 "yt-dlp.1" = "share/man/man1/yt-dlp.1"
134 path = "yt_dlp/version.py"
135 pattern = "_pkg_version = '(?P<version>[^']+)'"
137 [tool.hatch.envs.default]
138 features = ["curl-cffi", "default"]
139 dependencies = ["pre-commit"]
143 [tool.hatch.envs.default.scripts]
144 setup = "pre-commit install --config .pre-commit-hatch.yaml"
145 yt-dlp = "python -Werror -Xdev -m yt_dlp {args}"
147 [tool.hatch.envs.hatch-static-analysis]
149 features = ["static-analysis"]
150 dependencies = [] # override hatch ruff version
151 config-path = "pyproject.toml"
153 [tool.hatch.envs.hatch-static-analysis.scripts]
154 format-check = "autopep8 --diff {args:.}"
155 format-fix = "autopep8 --in-place {args:.}"
156 lint-check = "ruff check {args:.}"
157 lint-fix = "ruff check --fix {args:.}"
159 [tool.hatch.envs.hatch-test]
162 "pytest-randomly~=3.15",
163 "pytest-rerunfailures~=14.0",
164 "pytest-xdist[psutil]~=3.5",
167 [tool.hatch.envs.hatch-test.scripts]
168 run = "python -m devscripts.run_tests {args}"
169 run-cov = "echo Code coverage not implemented && exit 1"
171 [[tool.hatch.envs.hatch-test.matrix]]
188 "E402", # module level import not at top of file
189 "E501", # line too long
190 "E731", # do not assign a lambda expression, use a def
191 "E741", # ambiguous variable name
194 "E", # pycodestyle errors
195 "W", # pycodestyle warnings
200 [tool.ruff.lint.per-file-ignores]
201 "devscripts/lazy_load_template.py" = ["F401"]
202 "!yt_dlp/extractor/**.py" = ["I"]
204 [tool.ruff.lint.isort]
205 known-first-party = [
210 relative-imports-order = "closest-to-furthest"
213 max_line_length = 120
274 [tool.pytest.ini_options]
275 addopts = "-ra -v --strict-markers"