This repository has been archived by the owner on Aug 29, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathsetup.py
89 lines (82 loc) · 2.51 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
import os
from setuptools import setup, find_packages
import versioneer
import sys
ENABLE_INSTALL = os.getenv('CIF_ENABLE_INSTALL')
if sys.argv[-1] == 'install' and not ENABLE_INSTALL:
print('')
print('CIFv5 Should NOT be installed using traditional install methods')
print('Checkout the Docker instructions in the wiki')
print('')
print('https://github.com/csirtgadgets/cif-v5/wiki')
print('')
raise SystemError
# https://www.pydanny.com/python-dot-py-tricks.html
if sys.argv[-1] == 'test':
test_requirements = [
'pytest',
'coverage',
'pytest_cov',
]
try:
modules = map(__import__, test_requirements)
except ImportError as e:
err_msg = e.message.replace("No module named ", "")
msg = "%s is not installed. Install your test requirements." % err_msg
raise ImportError(msg)
r = os.system('pytest test -sv --cov=cif --cov-fail-under=50 && '
'xenon -b C -m B -a B -e "cif/_version*,cif/store/sqlite/filters.py" cif')
if r == 0:
sys.exit()
else:
raise RuntimeError('tests failed')
setup(
name="cif",
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
description="CIFv5",
long_description="",
url="https://github.com/csirtgadgets/cif-v5",
license='MPL2',
classifiers=[
"LICENSE :: OSI APPROVED :: MOZILLA PUBLIC LICENSE 2.0 (MPL 2.0)"
"Topic :: System :: Networking",
"Topic :: System :: Security",
"Programming Language :: Python",
],
keywords=['security', 'threat', 'intelligence', 'platform', 'tips'],
author="Wes Young",
author_email="wes@csirtgadgets.com",
packages=find_packages(exclude='test'),
python_requires='>=3.6, <3.8', # Software only validated on python 3.7
install_requires=[
'SQLAlchemy',
'SQLAlchemy-Utils',
'werkzeug',
'Flask',
'flask-cors',
'flask-compress',
'flask-restplus',
'gunicorn',
'gevent',
'maxminddb',
'geoip2',
'pytricia',
'csirtg-geo',
'csirtg-hunter',
'csirtg-enrichment',
'csirtg-dnsdb',
'cifsdk>=5.0a0,<6.0',
'csirtg-fm>=2.0b0,<3.0'
],
scripts=[],
entry_points={
'console_scripts': [
'cif-router=cif.router:main',
'cif-httpd=cif.http.app:main',
'cif-store=cif.store:main',
'cif-enricher=cif.enricher:main',
'cif-hunter=cif.hunter:main'
]
},
)