[C++-sig] Advice sought on making a large C++ application a Python extension

David Aldrich David.Aldrich at EU.NEC.COM
Mon Sep 6 18:50:45 CEST 2010


Hi Ravi

Thanks for your reply.

> Yes. PyOGRE or cctbx are excellent exmples of larger projects which use
> boost.python. You may want to use py++ to automate binding generation to
> save yourself quite some time.

Ok, I will look at py++.

> No. The python modules can be compiled using regular make. My
> recommendation
> is to avoid using bjam, even if it is technically superior, as it is not
> used
> widely enough to have the critical mass that other tools (autotools, cmake,
> scons) have which means that finding help is pretty painful (as there seem
> to
> be only a couple of people with knowledge sufficient to answer any non-
> trivial
> questions).

Understood. Though the boost community seems to promote bjam quite hard ;-)

> These are simply shared libraries (on POSIX). So the linker can read them.
> Avoid storing the python bindings in the same shared libraries as your
> core code since the coupling will be hard to undo while gaining nothing.

So, I should make both normal dll's for the C++ application and .pyd extensions for the Python interface?

Best regards

David


More information about the Cplusplus-sig mailing list