4 from setuptools
import setup
, Command
, find_packages
8 from distutils
.spawn
import spawn
11 # Get the version from yt_dlp/version.py without importing the package
12 exec(compile(open('yt_dlp/version.py').read(), 'yt_dlp/version.py', 'exec'))
15 DESCRIPTION
= 'Command-line program to download videos from YouTube.com and many other other video platforms.'
17 LONG_DESCRIPTION
= '\n\n'.join((
18 'Official repository: <https://github.com/yt-dlp/yt-dlp>',
19 '**PS**: Some links in this document will not work since this is a copy of the README.md from Github',
20 open('README.md', 'r', encoding
='utf-8').read()))
22 REQUIREMENTS
= ['mutagen', 'pycryptodome', 'websockets']
24 if sys
.argv
[1:2] == ['py2exe']:
25 raise NotImplementedError('py2exe is not currently supported; instead, use "pyinst.py" to build with pyinstaller')
29 ('share/bash-completion/completions', ['completions/bash/yt-dlp']),
30 ('share/zsh/site-functions', ['completions/zsh/_yt-dlp']),
31 ('share/fish/vendor_completions.d', ['completions/fish/yt-dlp.fish']),
32 ('share/doc/yt_dlp', ['README.txt']),
33 ('share/man/man1', ['yt-dlp.1'])
35 root
= os
.path
.dirname(os
.path
.abspath(__file__
))
37 for dirname
, files
in files_spec
:
40 if not os
.path
.exists(fn
):
41 warnings
.warn('Skipping file %s since it is not present. Try running `make pypi-files` first' % fn
)
44 data_files
.append((dirname
, resfiles
))
47 'data_files': data_files
,
49 params
['entry_points'] = {'console_scripts': ['yt-dlp = yt_dlp:main']}
52 class build_lazy_extractors(Command
):
53 description
= 'Build the extractor lazy loading module'
56 def initialize_options(self
):
59 def finalize_options(self
):
63 spawn([sys
.executable
, 'devscripts/make_lazy_extractors.py', 'yt_dlp/extractor/lazy_extractors.py'],
67 packages
= find_packages(exclude
=('youtube_dl', 'test', 'ytdlp_plugins'))
72 maintainer
='pukkandan',
73 maintainer_email
='pukkandan.ytdlp@gmail.com',
74 description
=DESCRIPTION
,
75 long_description
=LONG_DESCRIPTION
,
76 long_description_content_type
='text/markdown',
77 url
='https://github.com/yt-dlp/yt-dlp',
79 install_requires
=REQUIREMENTS
,
81 'Documentation': 'https://yt-dlp.readthedocs.io',
82 'Source': 'https://github.com/yt-dlp/yt-dlp',
83 'Tracker': 'https://github.com/yt-dlp/yt-dlp/issues',
84 #'Funding': 'https://donate.pypi.org',
87 'Topic :: Multimedia :: Video',
88 'Development Status :: 5 - Production/Stable',
89 'Environment :: Console',
90 'Programming Language :: Python',
91 'Programming Language :: Python :: 3.6',
92 'Programming Language :: Python :: 3.7',
93 'Programming Language :: Python :: 3.8',
94 'Programming Language :: Python :: Implementation',
95 'Programming Language :: Python :: Implementation :: CPython',
96 'Programming Language :: Python :: Implementation :: PyPy',
97 'License :: Public Domain',
98 'Operating System :: OS Independent',
100 python_requires
='>=3.6',
102 cmdclass
={'build_lazy_extractors': build_lazy_extractors}
,