-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
50 lines (46 loc) · 1.78 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
from setuptools import setup, find_packages
# Function to read the version from a file
def get_version(rel_path):
with open(rel_path, "r") as file:
for line in file.readlines():
if line.startswith('__version__'):
# Grabs the first ' or " enclosed string
delim = '"' if '"' in line else "'"
return line.split(delim)[1]
raise RuntimeError("Unable to find version string.")
# Automatically load requirements from a requirements.txt file
def load_requirements(filename='requirements.txt'):
with open(filename, 'r') as file:
return [line.strip() for line in file.readlines() if line.strip()]
# Reading the long description from README.md
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setup(
name='DOLOST',
version=get_version("src/DOLOST/version.py"),
author_email="idi@base4sec.com",
description="Deceptive Operations: Lure, Observe, and Secure Tool",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/Base4Security/DOLOS-T/",
project_urls={
"Bug Tracker": "https://github.com/Base4Security/DOLOS-T/issues",
},
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Topic :: Software Development :: Libraries :: Application Frameworks",
"Operating System :: OS Independent",
],
include_package_data=True,
package_dir={"": "src"},
packages=find_packages(where="src"),
install_requires=load_requirements(),
use_scm_version=True,
setup_requires=['setuptools_scm'],
entry_points={
'console_scripts': [
'DOLOST = DOLOST.cli:main'
]
},
)