-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathsetup.py
More file actions
80 lines (64 loc) · 2.17 KB
/
setup.py
File metadata and controls
80 lines (64 loc) · 2.17 KB
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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import re
import sys
from setuptools import find_packages, setup
POSIX = os.name == "posix"
WINDOWS = os.name == "nt"
LINUX = sys.platform.startswith("linux")
OSX = sys.platform.startswith("darwin")
FREEBSD = sys.platform.startswith("freebsd")
OPENBSD = sys.platform.startswith("openbsd")
NETBSD = sys.platform.startswith("netbsd")
BSD = FREEBSD or OPENBSD or NETBSD
SUNOS = sys.platform.startswith("sunos") or sys.platform.startswith("solaris")
def text_of(relpath):
thisdir = os.path.dirname(__file__)
file_path = os.path.join(thisdir, os.path.normpath(relpath))
with open(file_path) as f:
text = f.read()
return text
version = re.search(
"__version__ = '([^']+)'", text_of('agent/agent/__init__.py')
).group(1)
NAME = 'python-agent'
VERSION = version
DESCRIPTION = '数据结构化分析框架'
KEYWORDS = 'File CSV Log Structure'
AUTHOR = 'tong'
AUTHOR_EMAIL = 'g_tongbin@foxmail.com'
URL = 'http://t.navan.cc'
LICENSE = ''
PACKAGES = find_packages(exclude=['tests', 'tests.*'])
PACKAGE_DATA = {'agent': ['logging.conf', 'rule']}
INSTALL_REQUIRES = ['multiprocess>=0.70.5', 'pyparsing>=2.1.5', 'pytz',
'python-dateutil>=2.5.3', 'psutil>=4.3.0', 'pybloom>=1.1']
if not WINDOWS:
INSTALL_REQUIRES.append('pybloomfiltermmap>=0.3.15')
CLASSIFIERS = [
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7'
'Topic :: structure :: Agent :: Log :: File :: Csv',
'Topic :: Software Development :: Libraries'
]
LONG_DESCRIPTION = text_of('README.md')
params = {
'name': NAME,
'version': VERSION,
'description': DESCRIPTION,
'keywords': KEYWORDS,
'long_description': LONG_DESCRIPTION,
'author': AUTHOR,
'author_email': AUTHOR_EMAIL,
'url': URL,
'license': LICENSE,
'packages': PACKAGES,
'package_data': PACKAGE_DATA,
'install_requires': INSTALL_REQUIRES,
'classifiers': CLASSIFIERS,
}
setup(**params)