forked from ThreatConnect-Inc/tcex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
107 lines (100 loc) · 2.97 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
"""Setup for TcEx Module."""
# standard library
import os
import sys
# third-party
from setuptools import find_packages, setup
metadata = {}
metadata_file = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'tcex', '__metadata__.py')
with open(
metadata_file,
encoding='utf-8',
) as f:
exec(f.read(), metadata) # nosec; pylint: disable=exec-used
if not metadata:
raise RuntimeError(f'Could not load metadata file ({metadata_file}).')
with open('README.md') as f:
readme = f.read()
dev_packages = [
'black',
'codespell',
'fakeredis==1.7.0',
'flake8',
'isort>=5.0.0',
'mako',
'pre-commit',
'pydocstyle',
'pylint>=2.5.0',
'pytest',
'pytest-cov',
'pytest-html',
'pytest-ordering',
'pytest-xdist>=2.5.0',
'pyupgrade',
]
if sys.version_info <= (3, 7):
# these packages dropped support for 3.6
dev_packages.extend(['bandit==1.7.1', 'deepdiff==5.7.0'])
else:
dev_packages.extend(['bandit', 'deepdiff'])
setup(
author=metadata['__author__'],
author_email=metadata['__author_email__'],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Natural Language :: English',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Security',
],
description=metadata['__description__'],
download_url=metadata['__download_url__'],
extras_require={'dev': dev_packages, 'develop': dev_packages, 'development': dev_packages},
include_package_data=True,
install_requires=[
'arrow',
'astunparse',
'backports.cached-property; python_version < "3.8.0"',
'colorama>=0.3.9',
'future',
'inflect>=0.2.5',
'jmespath',
'paho-mqtt',
'pyaes',
'pydantic',
'python-dateutil>=2.6.1',
'pyyaml',
'redis>=2.10.6',
'requests',
'semantic_version',
'stdlib-list>=0.6.0',
'tinydb',
'typer',
'wrapt',
],
license=metadata['__license__'],
long_description=readme,
long_description_content_type='text/markdown',
name=metadata['__package_name__'],
packages=find_packages(exclude=['tests', 'tests.*']),
package_dir={'tcex': 'tcex'},
project_urls={
'Documentation': 'https://github.com/ThreatConnect-Inc/tcex',
'Source': 'https://github.com/ThreatConnect-Inc/tcex',
},
python_requires='>=3.6',
scripts=[
'bin/tcex',
],
url=metadata['__url__'],
version=metadata['__version__'],
zip_safe=True,
)