-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
60 lines (50 loc) · 1.64 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
# coding=utf-8
import os
from setuptools import find_packages
from setuptools import setup
VERSION = "0.1.0"
ROOT = os.path.dirname(os.path.abspath(__file__))
with open("requirements.txt") as fp:
install_requires = [
x.strip() for x in fp.read().split("\n") if not x.startswith("#")
]
def package_files(directories):
paths = []
for directory in directories:
for path, _, filenames in os.walk(directory):
for filename in filenames:
paths.append(os.path.join("..", path, filename))
return paths
extra_files = package_files(
["zspider/data", "zspider/www/static", "zspider/www/templates"]
)
setup(
name="zspider",
version=VERSION,
author="zephorwu",
author_email="[email protected]",
url="https://github.com/Zephor5/zspider",
description="A crawler system.",
long_description=open(os.path.join(ROOT, "README.md")).read(),
long_description_content_type="text/markdown",
packages=find_packages(exclude=("^utests/", "^data/")),
zip_safe=False,
install_requires=install_requires,
license="MIT",
package_data={"": extra_files},
entry_points={
"console_scripts": [
"zspider-dispatcher = zspider.dispatcher:main",
"zspider-web = zspider.web:main",
"zspider-crawler = zspider.crawler:main",
]
},
classifiers=[
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Topic :: Software Development",
],
)