[ccan] Using ccan with a C python extension

Naveen Nathan naveen at lastninja.net
Sun Jun 14 02:12:07 AEST 2015


Hi,

I've been a long time lurker on this mailing list but never had
an opportunity to use ccan in a project... until now.

Lately I've been working on a Python project which implements
net-snmp bindings in python and giving a more pythonic interface
(it is based on the orignal net-snmp python module).

The project can be found here: https://github.com/fgimian/easysnmp/

It is setup to be installed as a python package via pip/easy_install
which will:
    (1) fetch the python module
    (2) build the C extension, and finally
    (3) install it on the system (or virtual environment).

I specifically want to use ccan/{bitmap,endian} but unsure how
to integrate the code into our project's build process.

I envision at step (2) above, we will build libccan and statically
link it to the C extension. However, I will need a ccan config.h
which will vary per system. So this will involve generating the
file. Does that mean I should include the tools / configurator
as part of our python package?

I'd also be happy to contribute the method we ultimately go with
on the wiki, once I've sorted it out.

Thanks,
Naveen Nathan


More information about the ccan mailing list