forked from LifeActor/ykdl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
93 lines (84 loc) · 2.73 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup
try:
import wheel
except:
pass
import os, codecs, platform
here = os.path.abspath(os.path.dirname(__file__))
README = codecs.open(os.path.join(here, 'README.rst'), encoding='utf8').read()
CHANGES = codecs.open(os.path.join(here, 'CHANGELOG.rst'), encoding='utf8').read()
def find_packages(*tops):
packages = []
for d in tops:
for root, dirs, files in os.walk(d, followlinks=True):
if '__init__.py' in files:
packages.append(root)
return packages
from ykdl.version import __version__
try:
from ykdl.util.jsengine import JSEngine
except ImportError:
JSEngine = None
REQ = ['m3u8'] # remove pycryptodome, it is not being used now
EXT = {
'proxy': ['ExtProxy'],
'rangefetch': ['urllib3'],
'js': JSEngine and [] or ['PyChakra>=2.2.0'],
'color': os.name != 'nt' and [] or ['colorama']
}
EXT['all'] = sum((rs for rs in EXT.values()), [])
EXT['all-js'] = EXT['all'].copy()
try:
EXT['all-js'].remove(EXT['js'][0])
except IndexError:
pass
EXT['net'] = EXT['proxy'] + EXT['rangefetch']
setup(
name = "ykdl",
version = __version__,
author = "Zhang Ning",
author_email = "[email protected]",
maintainer = "SeaHOH",
maintainer_email = "[email protected]",
url = "https://github.com/zhangn1985/ykdl",
license = "MIT",
description = "a video downloader written in Python",
long_description = README + '\n\n' + CHANGES,
keywords = "video download youku acfun bilibili",
packages = find_packages('ykdl', 'cykdl'),
requires = REQ,
install_requires = REQ,
extras_require = EXT,
platforms = 'any',
zip_safe = True,
package_data = {
'ykdl': ['extractors/*.js', 'extractors/*/*.js'],
},
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Intended Audience :: Developers",
"Intended Audience :: End Users/Desktop",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Topic :: Internet",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Multimedia",
"Topic :: Multimedia :: Sound/Audio",
"Topic :: Multimedia :: Video",
"Topic :: Utilities"
],
entry_points={
"console_scripts": ["ykdl=cykdl.__main__:main"]
},
)