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(),
13 'yt_dlp/version.py', 'exec'))
16 DESCRIPTION
= 'Command-line program to download videos from YouTube.com and many other other video platforms.'
18 LONG_DESCRIPTION
= '\n\n'.join((
19 'Official repository: <https://github.com/yt-dlp/yt-dlp>',
20 '**PS**: Many links in this document will not work since this is a copy of the README.md from Github',
21 open('README.md', 'r', encoding
='utf-8').read()))
23 REQUIREMENTS
= ['mutagen', 'pycryptodome']
26 if len(sys
.argv
) >= 2 and sys
.argv
[1] == 'py2exe':
30 ('share/bash-completion/completions', ['completions/bash/yt-dlp']),
31 ('share/zsh/site-functions', ['completions/zsh/_yt-dlp']),
32 ('share/fish/vendor_completions.d', ['completions/fish/yt-dlp.fish']),
33 ('share/doc/yt_dlp', ['README.txt']),
34 ('share/man/man1', ['yt-dlp.1'])
36 root
= os
.path
.dirname(os
.path
.abspath(__file__
))
38 for dirname
, files
in files_spec
:
41 if not os
.path
.exists(fn
):
42 warnings
.warn('Skipping file %s since it is not present. Try running `make pypi-files` first.' % fn
)
45 data_files
.append((dirname
, resfiles
))
48 'data_files': data_files
,
50 params
['entry_points'] = {'console_scripts': ['yt-dlp = yt_dlp:main']}
53 class build_lazy_extractors(Command
):
54 description
= 'Build the extractor lazy loading module'
57 def initialize_options(self
):
60 def finalize_options(self
):
65 [sys
.executable
, 'devscripts/make_lazy_extractors.py', 'yt_dlp/extractor/lazy_extractors.py'],
70 packages
= find_packages(exclude
=('youtube_dl', 'test', 'ytdlp_plugins'))
75 maintainer
='pukkandan',
76 maintainer_email
='pukkandan.ytdlp@gmail.com',
77 description
=DESCRIPTION
,
78 long_description
=LONG_DESCRIPTION
,
79 long_description_content_type
='text/markdown',
80 url
='https://github.com/yt-dlp/yt-dlp',
82 install_requires
=REQUIREMENTS
,
84 'Documentation': 'https://yt-dlp.readthedocs.io',
85 'Source': 'https://github.com/yt-dlp/yt-dlp',
86 'Tracker': 'https://github.com/yt-dlp/yt-dlp/issues',
87 #'Funding': 'https://donate.pypi.org',
90 'Topic :: Multimedia :: Video',
91 'Development Status :: 5 - Production/Stable',
92 'Environment :: Console',
93 'Programming Language :: Python',
94 'Programming Language :: Python :: 2',
95 'Programming Language :: Python :: 2.6',
96 'Programming Language :: Python :: 2.7',
97 'Programming Language :: Python :: 3',
98 'Programming Language :: Python :: 3.2',
99 'Programming Language :: Python :: 3.3',
100 'Programming Language :: Python :: 3.4',
101 'Programming Language :: Python :: 3.5',
102 'Programming Language :: Python :: 3.6',
103 'Programming Language :: Python :: 3.7',
104 'Programming Language :: Python :: 3.8',
105 'Programming Language :: Python :: Implementation',
106 'Programming Language :: Python :: Implementation :: CPython',
107 'Programming Language :: Python :: Implementation :: IronPython',
108 'Programming Language :: Python :: Implementation :: Jython',
109 'Programming Language :: Python :: Implementation :: PyPy',
110 'License :: Public Domain',
111 'Operating System :: OS Independent',
113 python_requires
='>=2.6',
115 cmdclass
={'build_lazy_extractors': build_lazy_extractors}
,