forked from hjacobs/kube-ops-view
-
Notifications
You must be signed in to change notification settings - Fork 39
/
setup.py
78 lines (60 loc) · 2.29 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
import sys
from setuptools import find_packages, setup
from setuptools.command.test import test as TestCommand
from pathlib import Path
def read_version(package):
with (Path(package) / '__init__.py').open() as fd:
for line in fd:
if line.startswith('__version__ = '):
return line.split()[-1].strip().strip("'")
version = read_version('kube_ops_view')
class PyTest(TestCommand):
user_options = [('cov-html=', None, 'Generate junit html report')]
def initialize_options(self):
TestCommand.initialize_options(self)
self.cov = None
self.pytest_args = ['--cov', 'kube_ops_view', '--cov-report', 'term-missing', '-v']
self.cov_html = False
def finalize_options(self):
TestCommand.finalize_options(self)
if self.cov_html:
self.pytest_args.extend(['--cov-report', 'html'])
self.pytest_args.extend(['tests'])
def run_tests(self):
import pytest
errno = pytest.main(self.pytest_args)
sys.exit(errno)
def readme():
return open('README.rst', encoding='utf-8').read()
tests_require = [
'pytest',
'pytest-cov'
]
setup(
name='kube-ops-view',
packages=find_packages(),
version=version,
description='Kubernetes Operational View - read-only system dashboard for multiple K8s clusters',
long_description=readme(),
author='Henning Jacobs',
url='https://github.com/hjacobs/kube-ops-view',
keywords='kubernetes operations dashboard view k8s',
license='GNU General Public License v3 (GPLv3)',
tests_require=tests_require,
extras_require={'tests': tests_require},
cmdclass={'test': PyTest},
test_suite='tests',
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3.5',
'Topic :: System :: Clustering',
'Topic :: System :: Monitoring',
],
include_package_data=True, # needed to include JavaScript (see MANIFEST.in)
entry_points={'console_scripts': ['kube-ops-view = kube_ops_view.main:main']}
)