-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
77 lines (66 loc) · 1.89 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
import os
import sys
from setuptools import setup
from setuptools.command.test import test as TestCommand
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
if os.path.exists('README.rst'):
long_description = read('README.rst')
else:
long_description = read('README.md')
install_requires = [
'envparse',
'redis',
'hiredis',
'prometheus_client',
]
tests_require = [
'pytest',
'coverage',
'mockredispy',
'pytest-cov',
'pytest-mock',
]
def read_version():
for line in open(os.path.join('metrix', '__init__.py'), 'r'):
if line.startswith('__version__'):
return line.split('=')[-1].strip().strip("'")
class PyTest(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
import pytest
errcode = pytest.main(self.test_args)
sys.exit(errcode)
setup(
name='antismash-metrix',
version=read_version(),
author='Kai Blin',
author_email='[email protected]',
description='Metrics for the antiSMASH backend',
long_description=long_description,
install_requires=install_requires,
tests_require=tests_require,
cmdclass={'test': PyTest},
entry_points={
'console_scripts': [
'metrix=metrix.__main__:main',
],
},
packages=['metrix'],
url='https://github.com/antismash/metrix/',
license='Apache Software License',
classifiers=[
'Programming Language :: Python',
'Development Status :: 3 - Alpha',
'Intended Audience :: Science/Research',
'Topic :: Scientific/Engineering :: Bio-Informatics',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
],
extras_require={
'testing': tests_require,
},
)