-
Notifications
You must be signed in to change notification settings - Fork 163
/
setup.py
88 lines (74 loc) · 2.18 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
#!/usr/bin/env python
# -*- coding: utf-8 -*
from setuptools import setup, find_packages, Command
import os
import imp
class CleanCommand(Command):
"""Custom clean command to tidy up the project root."""
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
os.system('rm -vrf ./build ./dist ./*.pyc ./*.tgz ./*.egg-info')
py3 = imp.load_source(
'spider163.version', os.path.join('spider163', 'version.py')).PYTHON3
version = imp.load_source(
'spider163.version', os.path.join('spider163', 'version.py')).VERSION
desc = imp.load_source(
'spider163.version', os.path.join('spider163', 'version.py')).DESCRIPTION
install_requires = [
"beautifulsoup4==4.6.0",
"bs4==0.0.1",
"cement==2.10.2",
"certifi==2017.7.27.1",
"chardet==3.0.4",
"idna==2.6",
"Naked==0.1.31",
"pprint==0.1",
"cryptography==2.3",
"PyYAML==3.12",
"requests==2.18.4",
"shellescape==3.4.1",
"SQLAlchemy==1.1.15",
"SQLAlchemy-Utils==0.32.18",
"terminaltables==3.1.0",
"urllib3==1.24.2",
"Logbook==1.1.0",
"colorama==0.3.9",
"flask==1.0",
"python-docx==0.8.6",
"xlwt==1.3.0"
]
if py3 is True:
install_requires.append("mysqlclient==1.3.12")
else:
install_requires.append("MySQL-python==1.2.5")
setup(
version=version,
name='spider163',
author='ChengTian',
description='简单易用、功能强大的网易云音乐爬虫',
long_description=desc,
entry_points={
"console_scripts": ["spider163=spider163.bin.cli:main"]
},
url='https://github.com/Chengyumeng/spider163',
author_email='[email protected]',
packages=find_packages(),
include_package_data=True,
license='MIT License',
zip_safe=False,
install_requires=install_requires,
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Environment :: Web Environment',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.4',
],
cmdclass={
'clean': CleanCommand,
},
)