forked from bitbrute/evillimiter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
94 lines (73 loc) · 2.62 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
import os
import re
from setuptools import setup, find_packages, Command
class CleanCommand(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
os.system('rm -vrf ./build ./dist ./*.pyc ./*.pyo ./*.pyd ./*.tgz ./*.egg-info `find -type d -name __pycache__`')
def get_init_content():
with open(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'evillimiter', '__init__.py'), 'r') as f:
return f.read()
def get_version():
version_match = re.search(r'^__version__ = [\'"](\d\.\d\.\d)[\'"]', get_init_content(), re.M)
if version_match:
return version_match.group(1)
raise RuntimeError('Unable to locate version string.')
def get_description():
desc_match = re.search(r'^__description__ = [\'"]((.)*)[\'"]', get_init_content(), re.M)
if desc_match:
return desc_match.group(1)
raise RuntimeError('Unable to locate description string.')
NAME = 'evillimiter'
AUTHOR = 'bitbrute'
AUTHOR_EMAIL = '[email protected]'
LICENSE = 'MIT'
VERSION = get_version()
URL = 'https://github.com/bitbrute/evillimiter'
DESCRIPTION = get_description()
KEYWORDS = ["evillimiter", "limit", "bandwidth", "network"]
PACKAGES = find_packages()
INCLUDE_PACKAGE_DATA = True
CLASSIFIERS = ['Development Status :: 3 - Alpha',
'Environment :: Console',
'Intended Audience :: End Users/Desktop',
'Intended Audience :: System Administrators',
'Intended Audience :: Developers'
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Operating System :: Unix',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3 :: Only',
'Topic :: System :: Networking',
]
PYTHON_REQUIRES = '>= 3'
ENTRY_POINTS = { 'console_scripts': ['evillimiter = evillimiter.evillimiter:run'] }
INSTALL_REQUIRES = ['colorama',
'netaddr',
'netifaces',
'tqdm',
'scapy',
'terminaltables'
]
CMDCLASS = { 'clean': CleanCommand }
setup(
name=NAME,
author=AUTHOR,
author_email=AUTHOR_EMAIL,
description=DESCRIPTION,
license=LICENSE,
keywords=KEYWORDS,
packages=PACKAGES,
include_package_data=INCLUDE_PACKAGE_DATA,
version=VERSION,
python_requires=PYTHON_REQUIRES,
entry_points=ENTRY_POINTS,
install_requires=INSTALL_REQUIRES,
classifiers=CLASSIFIERS,
url=URL,
cmdclass=CMDCLASS,
)