distutils: optionally build C bindings to an external library

Kirill Simonov xi at gamma.dn.ua
Mon Oct 9 16:17:09 EDT 2006


Hi,

I've written a pure Python module, which could optionally use an
external C library. The external library is not required to be on the
user computer however, so I'd like not to build the bindings by default,
but allow a user to turn the build on by specifying some parameter to
`setup.py`. Basically, it should work like
    ./configure --with-some-lib[=/path]

Unfortunately I'm not quite sure how to implement this and I'm already
lost in the distutils internals. Could someone point me to the correct
direction, perhaps giving me a reference to an existing distutils
script?

-- 
xi



More information about the Python-list mailing list