forked from intel/cve-bin-tool
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
93 lines (86 loc) · 2.91 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
# Copyright (C) 2021 Intel Corporation
# SPDX-License-Identifier: GPL-3.0-or-later
import ast
import os
from setuptools import find_packages, setup
with open("README.md", encoding="utf-8") as f:
readme = f.read()
with open("requirements.txt", encoding="utf-8") as f:
requirements = f.read().split("\n")
with open(os.path.join("cve_bin_tool", "version.py")) as f:
for line in f:
if line.startswith("VERSION"):
VERSION = ast.literal_eval(line.strip().split("=")[-1].strip())
break
setup_kwargs = dict(
name="cve-bin-tool",
version=VERSION,
description="CVE Binary Checker Tool",
long_description=readme,
long_description_content_type="text/markdown",
author="Terri Oda",
author_email="[email protected]",
maintainer="Terri Oda",
maintainer_email="[email protected]",
url="https://github.com/intel/cve-bin-tool",
license="GPL-3.0-or-later",
keywords=["security", "tools", "CVE"],
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU General Public License (GPL)",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
],
install_requires=requirements,
extras_require={
"PDF": ["reportlab"],
},
packages=find_packages(
exclude=["locales", "presentation"],
),
package_data={
"cve_bin_tool.output_engine": [
"html_reports/templates/*.html",
"html_reports/css/*.css",
"html_reports/js/*.js",
"print_mode/templates/*.html",
],
"cve_bin_tool": [
"schemas/*.xsd",
],
},
entry_points={
"console_scripts": [
"cve-bin-tool = cve_bin_tool.cli:main",
"csv2cve = cve_bin_tool.csv2cve:main",
],
"cve_bin_tool.checker": [
"{} = cve_bin_tool.checkers.{}:{}".format(
filename.replace(".py", ""),
filename.replace(".py", ""),
"".join(
(filename.replace(".py", "") + " checker")
.replace("_", " ")
.title()
.split()
),
)
for filename in os.listdir(
os.path.join(
os.path.abspath(os.path.dirname(__file__)),
"cve_bin_tool",
"checkers",
)
)
if filename.endswith(".py") and "__init__" not in filename
],
},
)
setup(**setup_kwargs)