forked from jansenmarc/WavesGatewayFramework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
executable file
·113 lines (78 loc) · 2.66 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
108
109
110
111
112
113
from distutils.core import setup
from setuptools import find_packages
from distutils.cmd import Command
class CoverageCommand(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
import sys, subprocess
code = subprocess.call([
sys.executable, '-m', 'nose', 'tests', '--with-coverage', '--cover-package', 'waves_gateway',
'--cover-html'
])
exit(code)
class MyPyCommand(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
import sys, subprocess
code = subprocess.call([sys.executable, '-m', 'mypy', 'waves_gateway', '--ignore-missing-imports'])
exit(code)
class LintCommand(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
import sys, subprocess
code = subprocess.call([sys.executable, '-m', 'pylint', 'waves_gateway'])
exit(code)
class DocsCommand(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
import sys, subprocess, os, shutil
if os.path.exists("docs"):
shutil.rmtree("docs")
if os.path.exists(".apidoc"):
shutil.rmtree(".apidoc")
code = subprocess.call(['sphinx-apidoc', '-o', '.apidoc', 'waves_gateway', '-l', '-F', '-H', 'Waves-Gateway-Framework', '-A', 'Henning Gerrits', '-f'])
if code != 0:
exit(code)
code = subprocess.call(['sphinx-build', '.apidoc', 'docs'])
open('docs/.nojekyll', 'a').close()
exit(code)
setup(
name='waves_gateway',
url='https://github.com/jansenmarc/WavesGatewayFramework',
version='1.0.3',
author='Henning Gerrits',
test_suite='nose.collector',
tests_require=['nose'],
keywords='waves gateway wavesplatform',
python_requires='>=3.5',
install_requires=[
'PyWaves>=0.8.8', 'python-doc-inherit>=0.3.0', 'simplejson>=3.11.1', 'requests>=2.9.1', 'base58>=0.2.5',
'pymongo>=3.4.0', 'Flask>=0.12.2', 'gevent>=1.2.2'
],
description='A framework to connect other cryptocurrencies to the Waves-Platform.',
package_data={'waves_gateway': ['static/**/*', 'static/*']},
license='MIT',
long_description=open('README.rst').read(),
packages=find_packages(exclude=['tests']),
cmdclass={
'coverage': CoverageCommand,
'mypy': MyPyCommand,
'lint': LintCommand,
'docs': DocsCommand
})