-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.py
95 lines (83 loc) · 2.41 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
# -*- coding: utf-8 -*-
#
# This file were created by Python Boilerplate. Use boilerplate to start simple
# usable and best-practices compliant Python projects.
#
# Learn more about it at: http://github.com/fabiommendes/python-boilerplate/
#
import os
import codecs
from setuptools import setup, find_packages
import pkgutil
import sys
from setuptools.command.develop import develop
from setuptools.command.install import install
class PostDevelopCommand(develop):
"""Post-installation for development mode."""
def run(self):
develop.run(self)
class PostInstallCommand(install):
"""Post-installation for installation mode."""
def run(self):
install.run(self)
# Save version and author to __meta__.py
version = open('VERSION').read().strip()
dirname = os.path.dirname(__file__)
path = os.path.join(dirname, 'src', u'pentest', '__meta__.py')
meta = '''# Automatically created. Please do not edit.
__version__ = '%s'
__author__ = u'b0z'
''' % version
with open(path, 'w') as F:
F.write(meta)
hooks_path = os.path.dirname(os.path.abspath(__file__)) + '/src/pentest/hooks'
jarvis_entry_points = {
'console_scripts': [
'pentest = pentest.__main__:main'
]
}
for _, name, _ in pkgutil.iter_modules([hooks_path]):
jarvis_entry_points['console_scripts'].append('{hook} = pentest.hooks.{hook}:main'.format(hook=name))
setup(
# Basic info
name=u'jarvis-pentest',
version=version,
author='b0z',
author_email='[email protected]',
url='https://github.com/BastienFaure/jarvis',
license='MIT',
description='The pentest companion',
long_description=codecs.open('README.rst', 'rb', 'utf8').read(),
cmdclass={
'develop': PostDevelopCommand,
'install': PostInstallCommand,
},
# Classifiers (see https://pypi.python.org/pypi?%3Aaction=list_classifiers)
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Information Technology',
'License :: OSI Approved :: MIT License',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3 :: Only',
'Topic :: Software Development :: Libraries',
],
# Packages and dependencies
package_dir={'': 'src'},
packages=find_packages('src'),
install_requires=[
"netifaces",
"python-slugify"
],
extras_require={
'dev': [
'python-boilerplate[dev]',
],
},
# Other configurations
platforms='any',
# entry points
entry_points=jarvis_entry_points,
python_requires=">=3.3"
)