-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.py
More file actions
80 lines (70 loc) · 2.44 KB
/
setup.py
File metadata and controls
80 lines (70 loc) · 2.44 KB
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
"""
A cli tool too launch, manage and use ethereum client on the cloud
"""
import os
import sys
import re
from setuptools import find_packages, setup
def find_version():
with open('ethcloud/constants.py') as fl:
content = fl.read()
version_match = re.search(r"^VERSION = ['\"]([^'\"]*)['\"]",
content, re.M)
if version_match:
return version_match.group(1)
raise RuntimeError("Unable to find version string.")
def get_description():
try:
import pypandoc
return pypandoc.convert('README.md', 'rst')
except (IOError, ImportError):
return 'A cli tool too launch, manage and use ethereum client on the cloud'
version = find_version()
dependencies = ['click', 'ansible', 'PyYaml', 'boto3', 'attrdict']
description = get_description()
if sys.argv[-1] == 'tag':
os.system("git tag -a %s -m 'version %s'" % (version, version))
os.system("git push origin master --tags")
sys.exit()
if sys.argv[-1] == 'publish':
os.system("python setup.py sdist upload")
os.system("python setup.py bdist_wheel upload")
sys.exit()
setup(
name='ethcloud',
version=version,
url='https://github.com/kgritesh/ethcloud',
license='MIT',
author='Ritesh Kadmawala',
author_email='k.g.ritesh@gmail.com',
description=' A cli tool too launch, manage and use ethereum client on the cloud',
long_description=__doc__,
packages=find_packages(exclude=['tests']),
include_package_data=True,
zip_safe=False,
platforms='any',
install_requires=dependencies,
entry_points={
'console_scripts': [
'ethcloud = ethcloud:cli',
],
},
classifiers=[
# As from http://pypi.python.org/pypi?%3Aaction=list_classifiers
'Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: POSIX',
'Operating System :: MacOS',
'Operating System :: Unix',
'Operating System :: Microsoft :: Windows',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Topic :: Software Development :: Libraries :: Python Modules',
]
)