-
-
Notifications
You must be signed in to change notification settings - Fork 239
/
setup.py
77 lines (64 loc) · 2.5 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 sys
import codecs
from setuptools.command.test import test as TestCommand
from setuptools import setup
from puppetboard.version import __version__
with codecs.open('README.md', encoding='utf-8') as f:
README = f.read()
with codecs.open('CHANGELOG.md', encoding='utf-8') as f:
CHANGELOG = f.read()
requirements = None
with open('requirements.txt', 'r') as f:
requirements = [line.rstrip()
for line in f.readlines() if not line.startswith('-')]
requirements_test = None
with open('requirements-test.txt', 'r') as f:
requirements_test = [line.rstrip() for line in f.readlines()
if not line.startswith('-')]
class PyTest(TestCommand):
user_options = [('pytest-args=', 'a', "Arguments to pass to pytest")]
def initialize_options(self):
TestCommand.initialize_options(self)
self.pytest_args = '--cov=puppetboard --cov-report=term-missing'
def run_tests(self):
import shlex
import pytest
errno = pytest.main(shlex.split(self.pytest_args))
sys.exit(errno)
setup(
name='puppetboard',
version=__version__,
author='Vox Pupuli',
author_email='[email protected]',
packages=["puppetboard", "puppetboard.views"],
url='https://github.com/voxpupuli/puppetboard',
license='Apache License 2.0',
description='Web frontend for PuppetDB',
include_package_data=True,
long_description='\n'.join((README, CHANGELOG)),
long_description_content_type='text/markdown',
zip_safe=False,
python_requires=">=3.9.0",
install_requires=requirements,
tests_require=requirements_test,
extras_require={'test': requirements_test},
data_files=[('requirements_for_tests', ['requirements-test.txt']),
('requirements_for_docker', ['requirements-docker.txt'])],
keywords="puppet puppetdb puppetboard",
cmdclass={'test': PyTest},
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Framework :: Flask',
'Intended Audience :: System Administrators',
'Natural Language :: English',
'License :: OSI Approved :: Apache Software License',
'Operating System :: POSIX',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
],
)