This repository has been archived by the owner on Nov 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
60 lines (52 loc) · 1.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
from setuptools import setup, find_packages
from setuptools.command.install import install
import os
import shutil
VERSION = '0.4.1'
DESCRIPTION = 'DradisMD is CLI utility for exporting and importing Dradis projects to local files.'
class PostInstallCommand(install):
def run(self):
# Call parent run method
install.run(self)
# Copy sample_config.ini to ~/.config/dradismd/ after installation
config_dir = os.path.expanduser('~/.config/dradismd')
package_files = ['config.ini','evidence_template.textile','issue_template.textile','table_linebreak_fix_gfm.lua']
print(f'Copying packages files in {config_dir}')
if not os.path.exists(self.install_lib):
os.makedirs(config_dir)
for item in package_files:
item_path = os.path.join(self.install_lib, 'dradismd', item)
if not os.path.exists(os.path.join(config_dir, item)):
shutil.copy(item_path, config_dir)
# Setting up
setup(
name="dradismd",
version=VERSION,
author="Elliot Rasch",
description=DESCRIPTION,
url="https://github.com/T0ille/DradisMD",
packages=find_packages(),
package_data={"dradismd": ["*.ini", "*.textile","*.lua"]},
include_package_data=True,
install_requires=['dradis-api@git+https://github.com/NorthwaveSecurity/dradis-api@master',
'rich',
'pypandoc',
'timeago',
'requests',
'setuptools'],
keywords=["dradis api", "markdown"],
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
],
entry_points={
'console_scripts': [
'dradismd = dradismd.dradismd:main',
],
},
cmdclass={
'install': PostInstallCommand,
},
)