forked from zbohm/pycsob
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
69 lines (55 loc) · 1.78 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
# coding: utf-8
import sys
from os.path import join, dirname
from setuptools import setup
from setuptools.command.test import test
import pycsob
def parse_reqs(f='requirements.pip'):
ret = []
with open(join(dirname(__file__), f)) as fp:
for l in fp.readlines():
l = l.strip()
if l and not l.startswith('#'):
ret.append(l)
return ret
setup_requires = ['setuptools']
install_requires, tests_require = parse_reqs(), parse_reqs('requirements-test.pip')
with open('README.rst') as readmefile:
long_description = readmefile.read()
class PyTest(test):
def finalize_options(self):
test.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
# import here, cause outside the eggs aren't loaded
import pytest
errno = pytest.main(self.test_args)
sys.exit(errno)
setup(
name='pycsob',
version=pycsob.__versionstr__,
description='Python client for ČSOB Payment Gateway',
long_description=long_description,
author='Twisto',
author_email='[email protected]',
license='MIT',
url='https://github.com/TwistoPayments/pycsob',
packages=['pycsob', 'tests_pycsob'],
include_package_data=True,
classifiers=[
"Development Status :: 4 - Beta",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"Topic :: Utilities",
],
zip_safe=False,
setup_requires=setup_requires,
install_requires=install_requires,
tests_require=tests_require,
cmdclass={'test': PyTest}
)