Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ want the C extension, set the environment variable ``RADIX_NO_EXT=1``.
Tests are in the ``tests/`` directory and can be run with
``python setup.py nosetests``.

Windows
^^^^^^^
Windows support depends on a third-party library--`win-inet-pton`--to provide `inet_pton` and `inet_ntop` wrappers for the socket library. It is automatically included for installations on the Windows platform.

Usage
-----

Expand Down
3 changes: 3 additions & 0 deletions radix/radix.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import sys
if sys.platform.startswith('win'):
import win_inet_pton
from socket import (getaddrinfo, gaierror,
inet_pton, inet_ntop, AF_INET, AF_INET6, SOCK_RAW,
AI_NUMERICHOST)
Expand Down
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@
],
tests_require=tests_require,
packages=find_packages(exclude=['tests', 'tests.*']),
install_requires=[
'win-inet-pton >= 1.0.1;platform_system=="Windows"',
],
test_suite='nose.collector',
**extra_kwargs
)