13b6c3722SchristosInstallation 2*0cd9f4ecSchristos============ 33b6c3722Schristos 4*0cd9f4ecSchristosPrerequisites 5*0cd9f4ecSchristos------------- 63b6c3722Schristos 73b6c3722SchristosPython 2.4 or higher, SWIG 1.3 or higher, GNU make 83b6c3722Schristos 9*0cd9f4ecSchristosCompiling 10*0cd9f4ecSchristos--------- 113b6c3722Schristos 123b6c3722SchristosAfter downloading, you can compile the pyUnbound library by doing:: 133b6c3722Schristos 143b6c3722Schristos > tar -xzf unbound-x.x.x-py.tar.gz 153b6c3722Schristos > cd unbound-x.x.x 163b6c3722Schristos > ./configure --with-pyunbound 173b6c3722Schristos > make 183b6c3722Schristos 19*0cd9f4ecSchristosYou may want to enable ``--with-pythonmodule`` as well if you want to use 20*0cd9f4ecSchristospython as a module in the resolver. 213b6c3722Schristos 22*0cd9f4ecSchristosYou need ``GNU make`` to compile sources; ``SWIG`` and ``Python devel`` 23*0cd9f4ecSchristoslibraries to compile extension module. 243b6c3722Schristos 253b6c3722Schristos 26*0cd9f4ecSchristosTesting 27*0cd9f4ecSchristos------- 283b6c3722Schristos 29*0cd9f4ecSchristosIf the compilation is successful, you can test the python LDNS extension module 30*0cd9f4ecSchristosby:: 313b6c3722Schristos 323b6c3722Schristos > cd contrib/python 333b6c3722Schristos > make testenv 343b6c3722Schristos > ./dns-lookup.py 353b6c3722Schristos 36*0cd9f4ecSchristosYou may want to ``make install`` in the main directory since ``make testenv`` 37*0cd9f4ecSchristosis for debugging. In contrib/examples you can find simple applications written 38*0cd9f4ecSchristosin Python using the Unbound extension. 39