summaryrefslogtreecommitdiff
path: root/setup.py
blob: 32620fe425436e565d6d122c0c92d8433e61ded9 (plain)
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
#!/usr/bin/env python
#   Copyright (c) 2008 by David P. D. Moss. All rights reserved.
#
#   Released under the BSD license. See the LICENSE file for details.
"""
A distutils Python setup file. For setuptools support see setup_egg.py.
"""
import os
import sys

from setuptools import setup

if os.path.exists('MANIFEST'):
    os.remove('MANIFEST')

import netaddr

keywords = [
    'Networking', 'Systems Administration', 'IANA', 'IEEE', 'CIDR', 'IP',
    'IPv4', 'IPv6', 'CIDR', 'EUI', 'MAC', 'MAC-48', 'EUI-48', 'EUI-64'
]

#   Required by distutils only.
packages = [
    'netaddr',
    'netaddr.ip',
    'netaddr.eui',
    'netaddr.strategy',
    'netaddr.contrib',
]

#   Required by distutils only.
package_data = {
    'netaddr.ip': [
        '*.xml',
    ],
    'netaddr.eui': [
        '*.txt',
        '*.idx'
    ],
}

#------------------------------------------------------------------------
#   NB - keep this text around 74 characters wide so it is viewable
#        in various fixed window sizes.
long_description = """
        Provides support for:

        Layer 3 addresses
        -----------------

        - IPv4 and IPv6 addresses, subnets, masks, prefixes
        - iterating, slicing, sorting, summarizing and classifying IP networks
        - dealing with various ranges formats (CIDR, arbitrary ranges and globs, nmap)
        - set based operations (unions, intersections etc) over IP addresses and subnets
        - parsing a large variety of different formats and notations
        - looking up IANA IP block information
        - generating DNS reverse lookups
        - supernetting and subnetting

        Layer 2 addresses
        -----------------

        - representation and manipulation MAC addresses and EUI-64 identifiers
        - looking up IEEE organisational information (OUI, IAB)
        - generating derived IPv6 addresses

        Documentation
        -------------

        http://netaddr.readthedocs.io/

        Changes
        -------

        For details on the latest changes and updates, see :-

        http://netaddr.readthedocs.io/en/latest/changes.html

        Requirements
        ------------

        Supports Python versions 2.5 through 3.6

        Share and enjoy!
"""

platforms = 'OS Independent'

classifiers = [
    'Development Status :: 5 - Production/Stable',
    'Environment :: Console',
    'Intended Audience :: Developers',
    'Intended Audience :: Education',
    'Intended Audience :: Information Technology',
    'Intended Audience :: Science/Research',
    'Intended Audience :: System Administrators',
    'Intended Audience :: Telecommunications Industry',
    'License :: OSI Approved :: BSD License',
    'License :: OSI Approved :: MIT License',
    'Natural Language :: English',
    'Operating System :: OS Independent',
    'Programming Language :: Python',
    'Programming Language :: Python :: 2',
    'Programming Language :: Python :: 2.7',
    'Programming Language :: Python :: 3',
    'Programming Language :: Python :: 3.5',
    'Programming Language :: Python :: 3.6',
    'Programming Language :: Python :: 3.7',
    'Programming Language :: Python :: 3.8',
    'Topic :: Communications',
    'Topic :: Documentation',
    'Topic :: Education',
    'Topic :: Education :: Testing',
    'Topic :: Home Automation',
    'Topic :: Internet',
    'Topic :: Internet :: Log Analysis',
    'Topic :: Internet :: Name Service (DNS)',
    'Topic :: Internet :: Proxy Servers',
    'Topic :: Internet :: WWW/HTTP',
    'Topic :: Internet :: WWW/HTTP :: Indexing/Search',
    'Topic :: Internet :: WWW/HTTP :: Site Management',
    'Topic :: Security',
    'Topic :: Software Development',
    'Topic :: Software Development :: Libraries',
    'Topic :: Software Development :: Libraries :: Python Modules',
    'Topic :: Software Development :: Quality Assurance',
    'Topic :: Software Development :: Testing',
    'Topic :: Software Development :: Testing :: Traffic Generation',
    'Topic :: System :: Benchmark',
    'Topic :: System :: Clustering',
    'Topic :: System :: Distributed Computing',
    'Topic :: System :: Installation/Setup',
    'Topic :: System :: Logging',
    'Topic :: System :: Monitoring',
    'Topic :: System :: Networking',
    'Topic :: System :: Networking :: Firewalls',
    'Topic :: System :: Networking :: Monitoring',
    'Topic :: System :: Networking :: Time Synchronization',
    'Topic :: System :: Recovery Tools',
    'Topic :: System :: Shells',
    'Topic :: System :: Software Distribution',
    'Topic :: System :: Systems Administration',
    'Topic :: System :: System Shells',
    'Topic :: Text Processing',
    'Topic :: Text Processing :: Filters',
    'Topic :: Utilities',
]


def main():
    if sys.version_info[:2] < (2, 5):
        sys.stderr.write("netaddr requires Python version 2.5 or higher.\n")
        sys.exit(1)

    if sys.argv[-1] == 'setup.py':
        sys.stdout.write("To install, run 'python setup.py install'\n\n")

    setup_options = dict(
        author='David P. D. Moss, Stefan Nordhausen et al',
        author_email='drkjam@gmail.com',
        classifiers=classifiers,
        description='A network address manipulation library for Python',
        download_url='https://pypi.python.org/pypi/netaddr/',
        keywords=keywords,
        license='BSD License',
        long_description=long_description,
        name='netaddr',
        package_data=package_data,
        packages=packages,
        platforms=platforms,
        entry_points={'console_scripts': ['netaddr = netaddr.cli:main']},
        url='https://github.com/drkjam/netaddr/',
        version=netaddr.__version__,
    )

    setup(**setup_options)

if __name__ == "__main__":
    main()