From: Doug Gregor (dgregor_at_[hidden])
Date: 2007-08-28 14:14:00
On Aug 23, 2007, at 11:07 PM, Andreas Klöckner wrote:
> boost.mpi and boost.graph both build Python extension modules, but
> have good build system support right now. I care most about the
> issue, so I'll focus on that one.
> mpi.so, the Python extension module for boost.mpi gets built
> correctly, but it
> gets installed in the wrong location, namely $prefix/lib. I assume
> that is
> because it internally simply is a shared library. It really should
> be in
> $prefix/lib/pythonN.N/site-packages/boost/, with directories along
> that path
> created if necessary. Also, there's a file __init__.py under libs/
> that needs to go under that same path.
Right. Back before BBv2, both of these libraries had BBv1-based build
systems that probed Python to find the right installation location
and placed all of the necessary files into the right site-packages.
However, I wasn't able to get this BBv1 ported to BBv2, because I got
lost (again) in the BBv2 system.
> How do I make that happen? I just spent more time than I care to
> admit trying
> to figure this out, to no avail.
Ideally, the python-extension rule from python.jam would provide
installation directly into the appropriate site-packages, aided by
two Python extension-specific features, e.g.,
<python-sources>filename # files to be installed along with the
Python module in site-packages
<python-module-root>root # subdirectory of site-packages
where this module lives (e.g., boost/ or boost/mpi)
The BBv1 installation logic I had also dealt with home directory
installations, where everything went into ~/lib/python. I found that
useful on machines I don't administer.
We'll need help from a BBv2 expert to make this happen. I've hacked
quite a bit of BBv2 before, but for some reason this one stumped me.
It's pretty important for building Python modules with Boost.Python,
and as more Boost libraries get Python bindings it will become even
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk