]> jfr.im git - yt-dlp.git/blob - setup.py
Make sure playerOffsetMs is positive in youtube_live_chat by siikamiika #5 (blackjack...
[yt-dlp.git] / setup.py
1 #!/usr/bin/env python
2 # coding: utf-8
3
4 from setuptools import setup, Command, find_packages
5 import os.path
6 import warnings
7 import sys
8 from distutils.spawn import spawn
9
10 # Get the version from youtube_dlc/version.py without importing the package
11 exec(compile(open('youtube_dlc/version.py').read(),
12 'youtube_dlc/version.py', 'exec'))
13
14 DESCRIPTION = 'Media downloader supporting various sites such as youtube'
15 LONG_DESCRIPTION = 'Command-line program to download videos from YouTube.com and other video sites. Based on a more active community fork.'
16
17 if len(sys.argv) >= 2 and sys.argv[1] == 'py2exe':
18 print("inv")
19 else:
20 files_spec = [
21 ('etc/bash_completion.d', ['youtube-dlc.bash-completion']),
22 ('etc/fish/completions', ['youtube-dlc.fish']),
23 ('share/doc/youtube_dlc', ['README.txt']),
24 ('share/man/man1', ['youtube-dlc.1'])
25 ]
26 root = os.path.dirname(os.path.abspath(__file__))
27 data_files = []
28 for dirname, files in files_spec:
29 resfiles = []
30 for fn in files:
31 if not os.path.exists(fn):
32 warnings.warn('Skipping file %s since it is not present. Type make to build all automatically generated files.' % fn)
33 else:
34 resfiles.append(fn)
35 data_files.append((dirname, resfiles))
36
37 params = {
38 'data_files': data_files,
39 }
40 #if setuptools_available:
41 params['entry_points'] = {'console_scripts': ['youtube-dlc = youtube_dlc:main']}
42 #else:
43 # params['scripts'] = ['bin/youtube-dlc']
44
45 class build_lazy_extractors(Command):
46 description = 'Build the extractor lazy loading module'
47 user_options = []
48
49 def initialize_options(self):
50 pass
51
52 def finalize_options(self):
53 pass
54
55 def run(self):
56 spawn(
57 [sys.executable, 'devscripts/make_lazy_extractors.py', 'youtube_dlc/extractor/lazy_extractors.py'],
58 dry_run=self.dry_run,
59 )
60
61 setup(
62 name="youtube_dlc",
63 version=__version__,
64 maintainer="Tom-Oliver Heidel",
65 maintainer_email="theidel@uni-bremen.de",
66 description=DESCRIPTION,
67 long_description=LONG_DESCRIPTION,
68 # long_description_content_type="text/markdown",
69 url="https://github.com/pukkandan/yt-dlc",
70 packages=find_packages(exclude=("youtube_dl","test",)),
71 #packages=[
72 # 'youtube_dlc',
73 # 'youtube_dlc.extractor', 'youtube_dlc.downloader',
74 # 'youtube_dlc.postprocessor'],
75 classifiers=[
76 "Topic :: Multimedia :: Video",
77 "Development Status :: 5 - Production/Stable",
78 "Environment :: Console",
79 "Programming Language :: Python",
80 "Programming Language :: Python :: 2",
81 "Programming Language :: Python :: 2.6",
82 "Programming Language :: Python :: 2.7",
83 "Programming Language :: Python :: 3",
84 "Programming Language :: Python :: 3.2",
85 "Programming Language :: Python :: 3.3",
86 "Programming Language :: Python :: 3.4",
87 "Programming Language :: Python :: 3.5",
88 "Programming Language :: Python :: 3.6",
89 "Programming Language :: Python :: 3.7",
90 "Programming Language :: Python :: 3.8",
91 "Programming Language :: Python :: Implementation",
92 "Programming Language :: Python :: Implementation :: CPython",
93 "Programming Language :: Python :: Implementation :: IronPython",
94 "Programming Language :: Python :: Implementation :: Jython",
95 "Programming Language :: Python :: Implementation :: PyPy",
96 "License :: Public Domain",
97 "Operating System :: OS Independent",
98 ],
99 python_requires='>=2.6',
100
101 cmdclass={'build_lazy_extractors': build_lazy_extractors},
102 **params
103 )