]>
Commit | Line | Data |
---|---|---|
2f1765c4 | 1 | #!/usr/bin/env python |
dcdb292f | 2 | # coding: utf-8 |
2f1765c4 | 3 | |
58ac65e7 | 4 | from setuptools import setup, Command, find_packages |
6c57e8a0 | 5 | import os.path |
6c57e8a0 | 6 | import warnings |
4efe62a0 | 7 | import sys |
5a9858bf | 8 | from distutils.spawn import spawn |
a32b573c | 9 | |
cefecac1 U |
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')) | |
3d4b08df | 13 | |
94a538fa U |
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.' | |
770234af | 16 | |
fec89790 | 17 | if len(sys.argv) >= 2 and sys.argv[1] == 'py2exe': |
94a538fa | 18 | print("inv") |
fec89790 | 19 | else: |
6c57e8a0 | 20 | files_spec = [ |
cefecac1 U |
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']) | |
6c57e8a0 PH |
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 | ||
fec89790 | 37 | params = { |
6c57e8a0 | 38 | 'data_files': data_files, |
a5741a3f | 39 | } |
94a538fa | 40 | #if setuptools_available: |
cefecac1 | 41 | params['entry_points'] = {'console_scripts': ['youtube-dlc = youtube_dlc:main']} |
94a538fa U |
42 | #else: |
43 | # params['scripts'] = ['bin/youtube-dlc'] | |
a5741a3f | 44 | |
5a9858bf | 45 | class build_lazy_extractors(Command): |
3d4b08df | 46 | description = 'Build the extractor lazy loading module' |
5a9858bf JMF |
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( | |
cefecac1 | 57 | [sys.executable, 'devscripts/make_lazy_extractors.py', 'youtube_dlc/extractor/lazy_extractors.py'], |
5a9858bf JMF |
58 | dry_run=self.dry_run, |
59 | ) | |
60 | ||
cc51a7d4 | 61 | setup( |
94a538fa | 62 | name="youtube_dlc", |
652e7768 | 63 | version=__version__, |
94a538fa U |
64 | maintainer="Tom-Oliver Heidel", |
65 | maintainer_email="theidel@uni-bremen.de", | |
3d4b08df S |
66 | description=DESCRIPTION, |
67 | long_description=LONG_DESCRIPTION, | |
94a538fa | 68 | # long_description_content_type="text/markdown", |
c76eb41b | 69 | url="https://github.com/pukkandan/yt-dlc", |
6515018d | 70 | packages=find_packages(exclude=("youtube_dl","test",)), |
3fba0081 U |
71 | #packages=[ |
72 | # 'youtube_dlc', | |
73 | # 'youtube_dlc.extractor', 'youtube_dlc.downloader', | |
74 | # 'youtube_dlc.postprocessor'], | |
652e7768 | 75 | classifiers=[ |
94a538fa U |
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", | |
a5741a3f | 98 | ], |
94a538fa U |
99 | python_requires='>=2.6', |
100 | ||
101 | cmdclass={'build_lazy_extractors': build_lazy_extractors}, | |
fec89790 | 102 | **params |
6515018d | 103 | ) |