-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
56 lines (48 loc) · 1.41 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
import os
import ast
from setuptools import setup
PACKAGE_NAME = 'shinpachi'
def load_description(fname):
here = os.path.dirname(os.path.abspath(__file__))
with open(os.path.join(here, fname)) as f:
return f.read().strip()
def get_version(fname):
with open(fname) as f:
source = f.read()
module = ast.parse(source)
for e in module.body:
if isinstance(e, ast.Assign) and \
len(e.targets) == 1 and \
e.targets[0].id == '__version__' and \
isinstance(e.value, ast.Str):
return e.value.s
raise RuntimeError('__version__ not found')
setup(
name=PACKAGE_NAME,
version=get_version('{}/version.py'.format(PACKAGE_NAME)),
description='HTTP proxy and network protocol debugger',
long_description=load_description('readme.rst'),
classifiers=[
'Programming Language :: Python :: 3.4',
'License :: OSI Approved :: MIT License',
],
keywords='http proxy networking protocol debugger',
author='Kay Zheng',
author_email='[email protected]',
license='MIT',
zip_safe=False,
install_requires=[
'pyzmq >= 14.3.1',
'aiohttp >= 0.9.0',
'jinja2 >= 2.7.3',
'rauth >= 0.7.0',
'asyncio-redis >= 0.13.3',
],
extras_require={
'dev': []
},
entry_points='''
[console_scripts]
{0} = {0}:main
'''.format(PACKAGE_NAME),
)