-
Notifications
You must be signed in to change notification settings - Fork 59
/
Copy pathsetup.py
95 lines (80 loc) · 3.45 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
"""
diffy
=====
:copyright: (c) 2018 by Netflix, see AUTHORS for more
:license: Apache, see LICENSE for more details.
"""
import pip
import io
from distutils.core import setup
from setuptools import find_packages
if tuple(map(int, pip.__version__.split("."))) >= (10, 0, 0):
from pip._internal.download import PipSession
from pip._internal.req import parse_requirements
else:
from pip.download import PipSession
from pip.req import parse_requirements
with io.open("README.rst", encoding="utf-8") as readme:
long_description = readme.read()
def load_requirements(filename):
with io.open(filename, encoding="utf-8") as reqfile:
return [line.split()[0] for line in reqfile if not line.startswith(("#", "-"))]
def moto_broken():
"""Until https://github.com/spulec/moto/pull/1589 is resolved.
Then we will no longer need to fork moto, roll our own release, and rely either on
this hack, or the dependency_links declaration.
"""
reqts = load_requirements("dev-requirements.txt")
# return reqts.append('moto==1.3.5')
return reqts
# Populates __version__ without importing the package
__version__ = None
with io.open("diffy/_version.py", encoding="utf-8") as ver_file:
exec(ver_file.read()) # nosec: config file safe
if not __version__:
print("Could not find __version__ from diffy/_version.py")
exit(1)
setup(
name="diffy",
version=__version__,
author="Netflix",
author_email="security@netflix.com",
url="https://github.com/Netflix-Skunkworks/diffy",
description="Forensic differentiator",
long_description=long_description,
packages=find_packages(exclude=["diffy.tests"]),
include_package_data=True,
# dependency_links=['git+https://github.com/forestmonster/moto.git@master#egg=moto-1.3.5'],
install_requires=load_requirements("requirements.txt"),
tests_require=["pytest"],
extras_require={
"dev": load_requirements("dev-requirements.txt"),
"web": load_requirements("web-requirements.txt"),
},
entry_points={
"console_scripts": ["diffy = diffy_cli.core:entry_point"],
"diffy.plugins": [
"aws_persistence_s3 = diffy.plugins.diffy_aws.plugin:S3PersistencePlugin",
"aws_collection_ssm = diffy.plugins.diffy_aws.plugin:SSMCollectionPlugin",
"aws_target_auto_scaling_group = diffy.plugins.diffy_aws.plugin:AutoScalingTargetPlugin",
"local_analysis_simple = diffy.plugins.diffy_local.plugin:SimpleAnalysisPlugin",
"local_analysis_cluster = diffy.plugins.diffy_local.plugin:ClusterAnalysisPlugin",
"local_persistence_file = diffy.plugins.diffy_local.plugin:FilePersistencePlugin",
"local_payload_command = diffy.plugins.diffy_local.plugin:CommandPayloadPlugin",
"local_shell_collection = diffy.plugins.diffy_local.plugin:LocalShellCollectionPlugin",
"local_target = diffy.plugins.diffy_local.plugin:LocalTargetPlugin",
"osquery_payload = diffy.plugins.diffy_osquery.plugin:OSQueryPayloadPlugin",
],
},
classifiers=[
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
"Operating System :: OS Independent",
"Topic :: Software Development",
"Programming Language :: Python",
"Programming Language :: Python :: 3.6",
"Natural Language :: English",
"License :: OSI Approved :: Apache Software License",
],
python_requires=">=3.6",
)