-
Notifications
You must be signed in to change notification settings - Fork 124
/
setup.py
98 lines (80 loc) · 2.91 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
94
95
96
97
98
# -*- coding: utf-8 -*-
'''
Created on 2016-11-30
@author: hustcc
'''
from distutils.core import setup
from setuptools import find_packages
import os
import re
import io
packages = find_packages('app')
LONGDOC = """
redis-monitor is a web app base on
Python Flask + SQLAchemy + Redis + React.
Aims to deploy a redis monitor platform easily
How to deploy & run ?
> pip install redis-monitor
1. redis-monitor init : will init config into HOME dir,
then you can modify it or not.
2. redis-monitor createdb : will init database. (optional)
3. redis-monitor start : run web server, with default port 9527 (LZSB)
> then visit ip:9527
"""
def read(*names, **kwargs):
return io.open(
os.path.join(os.path.dirname(__file__), *names),
encoding=kwargs.get("encoding", "utf8")
).read()
def find_version(*file_paths):
version_file = read(*file_paths)
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
version_file, re.M)
if version_match:
return version_match.group(1)
raise RuntimeError("Unable to find version string.")
setup(name='redis-monitor',
version=find_version('app/__init__.py'),
description=(u'使用Flask开发的一个 web 可视化的 redis 监控程序,'
u'可以查看 redis 的服务器信息、实时监控 '
u'redis 的消息处理 ops、内存占用、cpu 消耗,以及 redis 联通时间。 '
u'A web visualization redis monitoring program. '
u'Performance optimized and '
u'very easy to install and deploy. '
u'the monitor data come from redis.info().'),
long_description=LONGDOC,
author='hustcc',
author_email='vip@hust.edu.cn',
url='https://github.com/hustcc',
license='MIT',
install_requires=[
'flask==0.11.1',
'flask-sqlalchemy==2.1',
'pymysql==0.7.9',
'jinja2==2.8',
'redis==2.10.5',
'Flask-Script==2.0.5'
],
classifiers=[
'Intended Audience :: Developers',
'Operating System :: OS Independent',
'Natural Language :: Chinese (Simplified)',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.5',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Topic :: Software Development',
'Topic :: Utilities'
],
keywords='redis, monitor, redis-monitor, redis client, redis usage',
include_package_data=True,
packages=['app'],
py_modules=['manage'],
zip_safe=False,
entry_points={
'console_scripts': ['redis-monitor=manage:run']
})