-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
79 lines (65 loc) · 2.3 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
#!/usr/bin/env python
import re
import os
import sys
from setuptools import setup
from setuptools import find_packages
# Find local file path
localdir = os.path.split(os.path.abspath(__file__))[0]
# Fix for tox to run OK. Adds in path to find README and requirements files
for dir_path in sys.path:
if "autoshell" in dir_path:
__file__ = os.path.join(re.findall(".*autoshell", dir_path)[0],
"setup.py")
# Using a function to make the damn linter happy
def version():
project_dir = os.path.join(localdir, "autoshell")
sys.path = [project_dir] + sys.path
import __version__
return __version__.version
with open(os.path.join(localdir, "README.md"), "r") as readme:
long_description = readme.read()
readme.close()
with open(os.path.join(localdir, "requirements.txt"), "r") as req_file:
install_requires = []
for package in req_file.read().split("\n"):
if package:
install_requires.append(package)
req_file.close()
CLASSIFIERS = [
'Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: Information Technology',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
'Natural Language :: English',
'Operating System :: MacOS',
'Operating System :: POSIX',
'Programming Language :: Python',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Topic :: Internet',
'Topic :: Utilities',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: System',
'Topic :: System :: Networking']
setup(name='autoshell',
version=version(),
description='Simple, fully programmable,\
shell-based network automation utility',
long_description=long_description,
long_description_content_type='text/markdown',
author='John W Kerns',
classifiers=CLASSIFIERS,
author_email='[email protected]',
url='https://github.com/PackeTsar/autoshell',
license="GNU",
packages=find_packages(),
install_requires=install_requires,
entry_points={
'console_scripts': [
'autoshell = autoshell.__main__:start'
]
}
)