Skip to content
This repository
David Moss
file 121 lines (80 sloc) 3.523 kb
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
netaddr is available in various packaged and non-packaged forms :

- source code repository access
- source release packages (tarball and zip formats)
- Python eggs
- Windows install packages

Linux distribution specific :

- Ubuntu and Debian (.deb packages)
- Fedora (.rpm packages)

Please see these Linux projects for availability and installation details.

You can also build your own RPM packages, using bdist_rpm with setup.py
available in the source tarball.

---------------------
Locating the software
---------------------

netaddr is available directly from the public subversion source code
repository.

Details on how to check out the source code can be found here :

    http://github.com/drkjam/netaddr/

Official milestone releases can be found here :

    http://github.com/drkjam/netaddr/downloads

-----------------------
Source Release Packages
-----------------------

Download the latest release tarball/zip file and extract it to a temporary
location or check out the source from the code hosting site into a local
working copy directory.

Run the setup file in the root directory like this::

    python setup.py install

This automatically places the required files in the ``lib/site-packages``
directory of the Python version you used to run the setup script, may be
part of a virtualenv or similar.

-----------
Python Eggs
-----------

You can build and install eggs with netaddr using the ``setup_egg.py``
file provided in the source distribution.

All the usual commands are supported e.g.::

    python setup_egg.py develop
    python setup_egg.py bdist_egg
    ...

This requires that you install distribute or setuptools which is not part of
the Python standard library.

See the following URL for details :-

    - ``distribute`` - http://guide.python-distribute.org/

    - ``setuptools`` (old) - http://peak.telecommunity.com/DevCenter/setuptools

.. warning:: ``setuptools`` is now very long in the tooth and full of bugs! \
    Just use distribute, or pip instead.

Download and install the latest easy_install script and run the following
command ::

    easy_install netaddr

This will go to the Python Package Index and automatically find the
appropriate version of netaddr for your Python setup.

Alternatively, you can use pip instead of easy_install.

Just download the latest version of pip from PyPI found here -
http://pypi.python.org/pypi/pip and run the following command ::

    pip install netaddr

------------------------
Windows Install Packages
------------------------

On Windows, it is usually more convenient to use the binary install packages.
Please note that you may want to download a source zip file as well if you
want local access to the API documentation and unit tests as these are not
distributed along with the code in the Windows install packages.

^^^^^^^^^^^^
Security Tip
^^^^^^^^^^^^

.. warning:: while efforts are made to ensure that the Windows executables \
    produced are virus free, they cannot be guaranteed to always be 100% free of \
    possible nasties. Use them solely at your own risk!

If you are either

a) paranoid, or
b) properly and correctly security conscious

either run your own virus checking software against the setup executable
before installing it or just download the .zip file and install netaddr using
Python's ``setup.py`` script to mitigate any potential problems.

-----------
Final Words
-----------

Always be sure you verify your downloads against the checksums on the code
hosting site's download page!
Something went wrong with that request. Please try again.