forked from tehmaze/ipcalc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
48 lines (40 loc) · 1.13 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
#!/usr/bin/env python
from distutils.core import setup
setup(name='ipcalc',
version='0.5',
description='IP subnet calculator',
long_description='''
About
=====
This module allows you to perform IP subnet calculations, there is support for
both IPv4 and IPv6 CIDR notation.
Example Usage
=============
::
>>> import ipcalc
>>> for x in ipcalc.Network('172.16.42.0/30'):
... print str(x)
...
172.16.42.0
172.16.42.1
172.16.42.2
172.16.42.3
>>> subnet = ipcalc.Network('2001:beef:babe::/48')
>>> print str(subnet.network())
2001:beef:babe:0000:0000:0000:0000:0000
>>> print str(subnet.netmask())
ffff:ffff:ffff:0000:0000:0000:0000:0000
>>> '192.168.42.23' in Network('192.168.42.0/24')
True
>>> long(IP('fe80::213:ceff:fee8:c937'))
338288524927261089654168587652869703991L
Bugs/Features
=============
You can issue a ticket in GitHub: https://github.com/tehmaze/ipcalc/issues
''',
author='Wijnand Modderman',
author_email='python@tehmaze.com',
url='http://tehmaze.github.com/ipcalc',
packages = [''],
package_dir = {'': 'src'},
)