2014-10-05 21:44:31 +00:00
|
|
|
Installation
|
2017-06-16 10:16:05 +00:00
|
|
|
============
|
2014-10-05 21:44:31 +00:00
|
|
|
|
2017-06-16 10:16:05 +00:00
|
|
|
Prerequisites
|
|
|
|
-------------
|
2014-10-05 21:44:31 +00:00
|
|
|
|
|
|
|
Python 2.4 or higher, SWIG 1.3 or higher, GNU make
|
|
|
|
|
2017-06-16 10:16:05 +00:00
|
|
|
Compiling
|
|
|
|
---------
|
2014-10-05 21:44:31 +00:00
|
|
|
|
|
|
|
After downloading, you can compile the pyUnbound library by doing::
|
|
|
|
|
2017-06-16 10:16:05 +00:00
|
|
|
> tar -xzf unbound-x.x.x-py.tar.gz
|
|
|
|
> cd unbound-x.x.x
|
|
|
|
> ./configure --with-pyunbound
|
|
|
|
> make
|
2014-10-05 21:44:31 +00:00
|
|
|
|
2017-06-16 10:16:05 +00:00
|
|
|
You may want to enable ``--with-pythonmodule`` as well if you want to use
|
|
|
|
python as a module in the resolver.
|
2014-10-05 21:44:31 +00:00
|
|
|
|
2017-06-16 10:16:05 +00:00
|
|
|
You need ``GNU make`` to compile sources; ``SWIG`` and ``Python devel``
|
|
|
|
libraries to compile extension module.
|
2014-10-05 21:44:31 +00:00
|
|
|
|
|
|
|
|
2017-06-16 10:16:05 +00:00
|
|
|
Testing
|
|
|
|
-------
|
2014-10-05 21:44:31 +00:00
|
|
|
|
2017-06-16 10:16:05 +00:00
|
|
|
If the compilation is successful, you can test the python LDNS extension module
|
|
|
|
by::
|
2014-10-05 21:44:31 +00:00
|
|
|
|
2017-06-16 10:16:05 +00:00
|
|
|
> cd contrib/python
|
|
|
|
> make testenv
|
|
|
|
> ./dns-lookup.py
|
2014-10-05 21:44:31 +00:00
|
|
|
|
2017-06-16 10:16:05 +00:00
|
|
|
You may want to ``make install`` in the main directory since ``make testenv``
|
|
|
|
is for debugging. In contrib/examples you can find simple applications written
|
|
|
|
in Python using the Unbound extension.
|