This repository has been archived by the owner on Jul 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 68
/
Copy pathsetup.py
executable file
·104 lines (93 loc) · 3.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
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
#!/usr/bin/env python3
from setuptools import setup, find_packages, Command
from setuptools.command.install import install as _install
from setuptools.command.bdist_egg import bdist_egg as _bdist_egg
import os
import sys
import logging
from counterblock.lib import config
class generate_configuration_files(Command):
description = "Generate configfiles from old counterparty-server and/or bitcoind config files"
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
from counterblock.lib import config_util
config_util.generate_config_files()
class install(_install):
description = "Install counterblock and dependencies"
def run(self):
caller = sys._getframe(2)
caller_module = caller.f_globals.get('__name__','')
caller_name = caller.f_code.co_name
if caller_module == 'distutils.dist' or caller_name == 'run_commands':
_install.run(self)
else:
self.do_egg_install()
self.run_command('generate_configuration_files')
required_packages = [
'appdirs==1.4.0',
'prettytable==0.7.2',
'python-dateutil==2.5.3',
'flask==0.11.1',
'json-rpc==1.10.3',
'pytest==2.9.2',
'pycoin==0.77',
#'python-bitcoinlib==0.10.1', <-- restore this when python-bitcoinlib 0.10.x with bech32 support is released
'pymongo==3.2.2',
'gevent==1.1.1',
'greenlet==0.4.9',
'grequests==0.3.0',
'redis==2.10.5',
'pyzmq==15.2.0',
'pillow==3.2.0',
'lxml==3.6.0',
'jsonschema==2.5.1',
'strict_rfc3339==0.7',
'rfc3987==1.3.6',
'aniso8601==1.1.0',
'maxminddb==2.0.3',
'colorama==0.3.7',
'configobj==5.0.6',
'repoze.lru==0.6'
]
setup_options = {
'name': 'counterblock',
'version': config.VERSION,
'author': 'Counterparty Developers',
'author_email': '[email protected]',
'maintainer': 'Counteparty Developers',
'maintainer_email': '[email protected]',
'url': 'http://counterparty.io',
'license': 'MIT',
'description': 'counterblock server',
'long_description': 'Implements support for extended functionality for counterparty-lib',
'keywords': 'counterparty, bitcoin, counterblock',
'classifiers': [
"Programming Language :: Python",
],
'download_url': 'https://github.com/CounterpartyXCP/counterblock/releases/tag/%s' % config.VERSION,
'provides': ['counterblock'],
'packages': find_packages(),
'zip_safe': False,
'setup_requires': ['appdirs', ],
'install_requires': required_packages,
'include_package_data': True,
'entry_points': {
'console_scripts': [
'counterblock = counterblock:server_main',
]
},
'cmdclass': {
'install': install,
'generate_configuration_files': generate_configuration_files
},
'package_data': {
'counterblock.schemas': ['asset.schema.json', 'feed.schema.json'],
}
}
if os.name == "nt":
sys.exit("Windows installs not supported")
setup(**setup_options)