-
Notifications
You must be signed in to change notification settings - Fork 3
/
setup.py
80 lines (65 loc) · 2.06 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
#!/usr/bin/env python
from setuptools import setup, find_packages, Command
import os
import sys
class BaseCommand(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
class TestCommand(BaseCommand):
description = "run self-tests"
def run(self):
ret = os.system('python tests.py')
if ret != 0:
sys.exit(-1)
class CoverageCommand(BaseCommand):
description = "run self-tests and report coverage (requires coverage.py)"
def run(self):
r = os.system('coverage run --source=hnbexchange tests.py')
if r != 0:
sys.exit(-1)
os.system('coverage html')
# To install the HNB Exchange library, open a Terminal shell, then run this
# file by typing:
#
# python setup.py install
if sys.version_info.major == 3 and sys.version_info.minor == 3:
REQUIRES = ["requests>=1.2.3"]
classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.3",
]
else:
REQUIRES = ["requests>=1.2.3", "mock>=1.0.1"]
classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
]
setup(
name='HNB-Exchange-Rate',
version='0.0.3',
author='Neven Mundar',
author_email='[email protected]',
description='HNB Exchange Rate retrieval and parsing',
license='MIT',
url='https://github.com/dobarkod/hnb-exchange-rate/',
classifiers=[
"Development Status :: 1 - Alpha",
"Environment :: Web Environment",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Topic :: Software Development :: Libraries :: Python Modules",
].extend(classifiers),
packages=find_packages(),
install_requires=REQUIRES,
cmdclass={
'test': TestCommand,
'coverage': CoverageCommand
}
)