[ccan] Using ccan with a C python extension

Rusty Russell rusty at rustcorp.com.au
Mon Jun 15 12:01:00 AEST 2015


Naveen Nathan <naveen at lastninja.net> writes:
> 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?

Hi!

        I think you should use autoconf, as it's the standard.  I keep
hoping someone will write the autotools stuff for CCAN for me :)

Cheers!
Rusty.


More information about the ccan mailing list