[ldns-users] adding (partial) Python3 support

Karel Slany karel.slany at nic.cz
Mon Aug 15 14:24:28 UTC 2011


Hi,

recently I have been toying with the ldns sources in order to make them
compile with Python3 support -- via the './configure --with-pyldns
PYTHON_VERSION=3' command. I've made several changes to the supplied
autoconf Python detection macros and others to make them work both with
Python 2 and 3.
The Python3 wrapper does now compile. However, the Python3 support is
incomplete. In Python3 they have abandoned the old C I/O API in favour
of the io module. Therefore SWIG does no longer support FILE* typemaps
-- i.e. C functions taking FILE* arguments will generate an error in
Python3.

This mail contains two patches:
1) python3.diff -- Contains modifications enabling the Python3 module to
compile and to run with Python3. It also contains a few working examples
for Python3 which do the same as the original Python2 examples.

2)ldns_axfr_start.diff -- As I discovered, the ldns-axf example did not
work -- this patch should fix it.

The patches are against the 3523 (current) svn revision.

Best regard

Karel Slany
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: python3.diff
URL: <http://lists.nlnetlabs.nl/pipermail/ldns-users/attachments/20110815/da89a174/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ldns_axfr_start.diff
URL: <http://lists.nlnetlabs.nl/pipermail/ldns-users/attachments/20110815/da89a174/attachment-0001.ksh>


More information about the ldns-users mailing list