-
Notifications
You must be signed in to change notification settings - Fork 87
/
Copy pathsetup.py
77 lines (72 loc) · 2.55 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
from setuptools import setup, find_packages
import platform
import re
distro, version, _ = platform.dist()
if not distro:
distro, version, _ = platform.linux_distribution(supported_dists=['system'])
# Default to cent7
data_files = [('/usr/lib/systemd/system', ['pkg/hubble.service']),
('/etc/hubble', ['conf/hubble']),]
if distro == 'redhat' or distro == 'centos':
if version.startswith('6'):
data_files = [('/etc/init.d', ['pkg/hubble']),
('/etc/hubble', ['conf/hubble']),]
elif version.startswith('7'):
data_files = [('/usr/lib/systemd/system', ['pkg/hubble.service']),
('/etc/hubble', ['conf/hubble']),]
elif distro == 'Amazon Linux AMI':
data_files = [('/etc/init.d', ['pkg/hubble']),
('/etc/hubble', ['conf/hubble']),]
with open('hubblestack/__init__.py', 'r') as fd:
version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
fd.read(), re.MULTILINE).group(1)
setup(
name='hubblestack',
version=version,
description='Modular, open-source security compliance framework',
author='Colton Myers',
author_email='colton.myers@gmail.com',
maintainer='Colton Myers',
maintainer_email='colton.myers@gmail.com',
url='https://hubblestack.io',
license='Apache 2.0',
packages=find_packages(),
entry_points={
'console_scripts': [
'hubble = hubblestack.daemon:run',
],
},
install_requires=[
'salt-ssh >= 2015.8.0',
'gitpython',
'pyinotify',
],
data_files=data_files,
options={
# 'build_scripts': {
# 'executable': '/usr/bin/env python',
# },
'bdist_rpm': {
'requires': 'salt python-argparse python-inotify python-pygit2 python-setuptools',
},
},
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: Apache Software License',
'Natural Language :: English',
'Operating System :: Unix',
'Operating System :: POSIX',
'Operating System :: POSIX :: Linux',
'Operating System :: Microsoft :: Windows',
'Programming Language :: Python',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Topic :: Security',
'Topic :: System',
'Topic :: System :: Logging',
'Topic :: System :: Monitoring',
'Topic :: System :: Systems Administration',
],
)