-
Notifications
You must be signed in to change notification settings - Fork 6
/
setup.py
84 lines (67 loc) · 2.24 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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Install : python setup.py install
Register : python setup.py register
platform = 'Unix',
download_url = 'http://xael.org/norman/python/python-nmap/',
"""
import codecs
import os
from distutils.core import setup, Command, Extension
nmap = Extension(
'nmap',
sources=['nmap/nmap.py', 'nmap/__init__.py', 'nmap/example.py']
)
from nmap import *
here = os.path.dirname(os.path.abspath(__file__))
version = nmap.__version__
class VersionCommand(Command):
description = 'Show library version'
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
print(version)
# Get the shor description
description = 'This is a python class to use nmap and access scan results from python3',
# Get the long description
with codecs.open(os.path.join(here, 'README.rst')) as f:
long_description = '\n{}'.format(f.read())
# Get change log
with codecs.open(os.path.join(here, 'CHANGELOG')) as f:
changelog = f.read()
long_description += '\n\n{}'.format(changelog)
setup(
author='Alexandre Norman',
author_email='[email protected]',
bugtrack_url='https://bitbucket.org/xael/python-nmap',
cmdclass={'version': VersionCommand},
description=description,
classifiers=[
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python",
"Environment :: Console",
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: GNU General Public License (GPL)",
"Operating System :: OS Independent",
"Topic :: System :: Monitoring",
"Topic :: System :: Networking",
"Topic :: System :: Networking :: Firewalls",
"Topic :: System :: Networking :: Monitoring",
],
keywords="nmap, portscanner, network, sysadmin",
# Get more strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
license='gpl-3.0.txt',
long_description=long_description,
name='python-nmap',
packages=['nmap'],
platforms=[
"Operating System :: OS Independent",
],
url='http://xael.org/pages/python-nmap-en.html',
version=version,
)