forked from NetManAIOps/donut
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
67 lines (59 loc) · 2.02 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
"""
Donut
-----
Donut is an anomaly detection algorithm for periodic KPIs.
"""
import ast
import codecs
import os
import re
import sys
from setuptools import setup, find_packages
_version_re = re.compile(r'__version__\s+=\s+(.*)')
_source_dir = os.path.split(os.path.abspath(__file__))[0]
if sys.version_info[0] == 2:
def read_file(path):
with open(path, 'rb') as f:
return f.read()
else:
def read_file(path):
with codecs.open(path, 'rb', 'utf-8') as f:
return f.read()
version = str(ast.literal_eval(_version_re.search(
read_file(os.path.join(_source_dir, 'donut/__init__.py'))).group(1)))
requirements_list = list(filter(
lambda v: v and not v.startswith('#'),
(s.strip() for s in read_file(
os.path.join(_source_dir, 'requirements.txt')).split('\n'))
))
dependency_links = [s for s in requirements_list if s.startswith('git+')]
install_requires = [s for s in requirements_list if not s.startswith('git+')]
setup(
name='Donut',
version=version,
url='https://github.com/haowen-xu/donut/',
license='MIT',
author='Haowen Xu',
author_email='[email protected]',
description='Donut is an anomaly detection algorithm for periodic KPIs.',
long_description=__doc__,
packages=find_packages('.', include=['donut', 'donut.*']),
zip_safe=False,
platforms='any',
setup_requires=['setuptools'],
install_requires=install_requires,
dependency_links=dependency_links,
classifiers=[
'Development Status :: 2 - Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Topic :: Scientific/Engineering :: Artificial Intelligence',
'Topic :: Software Development :: Libraries :: Python Modules'
]
)