On Sat, 5 Oct 2002, David Abrahams wrote:
Hi,
I'm about to release v2 of Boost.Python, and I thought it might be nice to provide a distutils setup for it. We have our own build system, but some Python users might be more comfortable with distutils, and I have a secret hope that distutils will be able to work on a few paltforms we don't have covered such as MacOS X.
I'm now kicking myself for throwing them away, but one of my users sent me distutils scripts for Boost.Python a while back as part of a bug report.
My problems are twofold:
1. I have to distribute a shared library which is not an extension module. The extension modules I have to distribute (tests and examples) all link to this library.
Attached is a setup_libbpl2.py file that builds libbpl2.so file containing boost.python code. After setup_libbpl2.py install it can be used as follows. The setup.py file of the extension module contains the following bits: from libbpl2 import __file__ as boost_so ext = Extension('foo', sources=[..], include_dirs=[boost_dir]+.., .. extra_objects = [boost_so], ) Attachement also includes setup_ginac.py file as a real example of using libbpl2 library. Note that setup_libbpl2.py will not probaly work with the current boost.python V2 as the last time I checked it was few months ago and since then I have not had time to update it. However, the attached files illustrate one way how to solve one of your problems. HTH, Pearu