-
Notifications
You must be signed in to change notification settings - Fork 87
/
setup.py
114 lines (101 loc) · 2.82 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# pylint: disable=invalid-name
from setuptools import setup, find_packages
import platform
try:
import distro
distro, version, _ = distro.linux_distribution(full_distribution_name=False)
except ImportError:
distro = version = ""
platform_name = platform.system()
# Default to CentOS7
data_files = [
("/usr/lib/systemd/system", ["pkg/source/hubble.service"]),
("/etc/hubble", ["conf/hubble"]),
]
build_dependencies = [
"distro",
"psutil",
"defusedxml",
"msgpack",
"pyyaml",
"objgraph",
"pycryptodome",
"cryptography",
"pyopenssl",
"requests>=2.13.0",
"daemon",
"pygit2",
"gitpython",
"pyinotify",
"cffi",
"croniter",
"vulners",
"ntplib",
"patch==1.*",
"packaging",
"pyparsing",
"urllib3>=1.26.5",
]
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/source/hubble.service"]),
("/etc/hubble", ["conf/hubble"]),
]
elif distro == "Amazon Linux AMI":
data_files = [
("/etc/init.d", ["pkg/hubble"]),
("/etc/hubble", ["conf/hubble"]),
]
if platform_name == "Windows":
build_dependencies.remove("pyinotify")
def _hubble_version():
try:
from hubblestack.version import __version__
return __version__
except:
pass
return "unknown"
setup(
name="hubblestack",
version=_hubble_version(),
description="Modular, open-source security compliance framework",
author="Colton Myers",
author_email="[email protected]",
maintainer="Colton Myers",
maintainer_email="[email protected]",
url="https://hubblestack.io",
license="Apache 2.0",
packages=find_packages(),
entry_points={
"console_scripts": [
"hubble = hubblestack.daemon:run",
],
},
install_requires=build_dependencies,
data_files=data_files,
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",
],
)