forked from wackou/bts_tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
93 lines (80 loc) · 3.39 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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# bts_tools - Tools to easily manage the bitshares client
# Copyright (c) 2014 Nicolas Wack <[email protected]>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from setuptools import setup, find_packages
import os, os.path
import subprocess
here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.rst')).read()
HISTORY = open(os.path.join(here, 'HISTORY.rst')).read()
VERSION = '0.5.3'
install_requires = ['Flask', 'requests', 'psutil', 'pyyaml', 'dogpile.cache',
'beautifulsoup4', 'maxminddb-geolite2', 'autobahn', 'ruamel.yaml',
'doit', 'retrying', 'ecdsa', 'cachetools', 'wrapt',
'geoip2', # for ip addr -> lat, lon (need account on maxmind)
'pendulum', 'bitcoinaverage'
]
setup_requires = []
entry_points = {
'console_scripts': [
'bts = bts_tools.cmdline:main_bts',
'muse = bts_tools.cmdline:main_muse',
'steem = bts_tools.cmdline:main_steem',
'ppy = bts_tools.cmdline:main_ppy'
],
}
args = dict(name='bts_tools',
version=VERSION,
description='Graphene blockchains management tools',
long_description=README + '\n\n\n' + HISTORY,
# Get strings from
# http://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers=['Development Status :: 4 - Beta',
'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
],
keywords='Graphene blockchain witness management tools bitshares steem peerplays muse',
author='Nicolas Wack',
author_email='[email protected]',
url='https://github.com/wackou/bts_tools',
packages=find_packages(),
include_package_data=True,
install_requires=install_requires,
setup_requires=setup_requires,
entry_points=entry_points,
)
# if we are creating a source tarball, include the version in a text file
version_file = os.path.join(here, 'bts_tools', 'version.txt')
create_version_file = not os.path.exists(version_file)
if create_version_file:
with open(version_file, 'w') as f:
try:
p = subprocess.Popen('git describe --tags', shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
stdout, stderr = p.communicate()
f.write(str(stdout, encoding='utf-8'))
except:
f.write(VERSION)
setup(**args)
if create_version_file:
try:
os.remove(version_file)
except OSError:
pass