forked from gpaulissen/ofxstatement-mt940
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·97 lines (82 loc) · 2.63 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
#!/usr/bin/python3
# -*- coding: utf-8 -*-
"""Setup
"""
import sys
from setuptools import find_packages
from setuptools.command.test import test as TestCommand
from distutils.core import setup
# To prevent importing about and thereby breaking the coverage info we use this
# exec hack
about = {}
with open('__about__.py') as fp:
exec(fp.read(), about)
class PyTest(TestCommand):
user_options = [('pytest-args=', 'a', 'Arguments to pass to pytest')]
def initialize_options(self):
TestCommand.initialize_options(self)
self.pytest_args = ''
def run_tests(self):
import shlex
# import here, cause outside the eggs aren't loaded
import pytest
errno = pytest.main(shlex.split(self.pytest_args))
sys.exit(errno)
tests_require = [
'flake8',
'mypy',
'pytest',
'pytest-cache',
'pytest-cover',
'pytest-flakes',
'pytest-pep8',
'pytest-pycodestyle',
'pyyaml',
]
if sys.argv[-1] == 'info':
for k, v in about.items():
print('%s: %s' % (k, v))
sys.exit()
if __name__ == '__main__':
with open('README.md') as f:
readme = f.read()
with open('CHANGELOG.md') as f:
changes = f.read()
setup(
name=about['__package_name__'],
version=about['__version__'],
author=about['__author__'],
author_email=about['__email__'],
description=about['__description__'],
url=about['__url__'],
license=about['__license__'],
keywords=["ofx", "banking", "statement", "mt940"],
packages=find_packages('src'),
package_dir={'': 'src'},
namespace_packages=["ofxstatement", "ofxstatement.plugins"],
long_description=readme + changes,
long_description_content_type='text/markdown',
include_package_data=True,
install_requires=['ofxstatement>0.6.4', 'mt-940>=4.19.0'],
tests_require=tests_require,
setup_requires=[
'setuptools>=39.1.0',
],
zip_safe=True,
cmdclass={'test': PyTest},
extras_require={'test': tests_require},
classifiers=[
'Development Status :: 6 - Mature',
'Programming Language :: Python :: 3',
'Natural Language :: English',
'Topic :: Office/Business :: Financial :: Accounting',
'Topic :: Utilities',
'Environment :: Console',
'Operating System :: OS Independent',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)'
],
entry_points={
'ofxstatement':
['mt940 = ofxstatement.plugins.mt940:Plugin']
},
)