-
Notifications
You must be signed in to change notification settings - Fork 4
/
setup.py
107 lines (92 loc) · 2.61 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
99
100
101
102
103
104
105
106
107
"""
ConsenSys-Utils
~~~~~~~~~~~~~~~
A set of utility resources used on a daily basis by ConsenSys France Engineering team
:copyright: Copyright 2017 by ConsenSys France.
:license: BSD, see LICENSE for more details.
"""
import os
import re
from setuptools import setup, find_packages
def read(file_name):
try:
return open(os.path.join(os.path.dirname(__file__), file_name)).read()
except FileNotFoundError:
return ''
def find_version(file):
"""Attempts to find the version number in a file.
Raises RuntimeError if not found.
:param file: File where to find version
:type file: str
"""
version = ''
with open(file, 'r') as fp:
reg = re.compile(r'__version__ = [\'"]([^\'"]*)[\'"]')
for line in fp:
m = reg.match(line)
if m:
version = m.group(1)
break
if not version:
raise RuntimeError('Cannot find version information')
return version
config_dep = [
'cfg-loader>=0.2.2',
]
flask_dep = config_dep + [
'flasgger>=0.8.0',
'flask>=1.0.0',
'flask-restful>=0.3.6',
'flask-web3>=0.1.0',
'gunicorn>=19.9.0',
'healthcheck>=1.3.0',
]
web3_dep = config_dep + [
'web3>=4.4.0',
]
setup(
name='ConsenSys-Utils',
version=find_version('consensys_utils/__init__.py'),
license=read('LICENSE'),
url='https://github.com/ConsenSys/consensys-utils',
author='Nicolas Maurice',
author_email='[email protected]',
maintainer='ConsenSys France',
description='A set of utility resources used on a daily basis by ConsenSys France Engineering team',
long_description=read('README.rst'),
packages=find_packages(),
extras_require={
'dev': [
'flake8',
'autoflake',
'autopep8',
'coverage',
'eth-tester[py-evm]==0.1.0-beta.26',
'pytest>=3',
'pytest-flask',
'tox',
'sphinx',
'sphinx_rtd_theme',
],
'doc': [
'sphinx',
'sphinx_rtd_theme',
],
'config': config_dep,
'flask': flask_dep,
'all': flask_dep,
},
zip_safe=False,
platforms='any',
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: POSIX',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
],
test_suite='tests'
)