[C++-sig] boost.python w/ boost.build v2 (was Re: Boost.Python, MinGW, & ImportError)

Corey Wright undefined at pobox.com
Sun Sep 24 23:01:05 CEST 2006


wow, it's hard finding straight forward documentation on building
boost.python (including examples) with boost.build v2.  lots of practical
stuff for v1, lots of general purpose documentation on v2, but google and i
had a hard finding any step-by-step instructions for using v2.  (maybe i
was looking too hard for something specific to boost.python.)

i started with boost.python from 1.33.1 and mingw and got nowhere.  i
peeked a little bit into boost.build v2, but the only reference i could
find for mingw was in a comment.

i decided to fall back to gcc on linux (a more popular, and hopefully
better tested, platform).  i got the boost.python library and the example
python modules to build, but the modules had the "lib" prefix which caused
errors on import (as the modules' init functions did not include the lib).

i thought to try the daily tarball.  boost.python, examples, and tests
built and executed after i applied the attached patch to Jamfile.v2.

i've also attached my changes to boost-build.jam to facilitate using v2
while still allowing v1, modeled after the top-level boost-build.jam.

my user-config.jam is attached as it took me 30 minutes to an hour of
searching and reading until i had constructed it.  hopefully it'll save
somebody from the same struggle.  i read the boost.build v2 documentation,
but it was so abstract and general purpose that it didn't help me.  i
finally found http://zigzag.cs.msu.su/boost.build/wiki/BoostRegressionsV2
which is very concrete with examples, but initially i wasn't sure how
applicable it was because it's for "boost regression testing".

anyways, i'll look at boost.python on mingw sometime this week, but wanted
to feed back my patch for Jamfile.v2 ("release early, release often").

again, thanks for boost (python, build, etc).

ps i'm posting this to c++-sig as this email is specific to boost.python (i
only previously posted to boost-users because my patch resolved a problem
previously discussed there) and i'm too lazy to subscribe to boost devel.
--
undefined at pobox.com

On Wed, 20 Sep 2006 12:01:46 -0400
David Abrahams <dave at boost-consulting.com> wrote:

> Corey Wright <undefined at pobox.com> writes:
> 
> > thanks for boost.python and the mingw support (it feels liberating to
> > compile free software, gratis & libre, with free software; and we'll
> > overlook the operating system ;-).
> 
> Corey,
> 
> Thank you very much for the very complete analysis; it is _much_
> appreciated!  We are switching to Boost.Build v2 for the upcoming
> release and I'd be grateful if you'd do a little testing to verify
> that it already behaves correctly with MinGW.  If not, we'll have to
> get it fixed.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Jamfile.v2.patch
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20060924/f5f3b072/attachment.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: boost-build.jam.patch
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20060924/f5f3b072/attachment-0001.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: user-config.jam
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20060924/f5f3b072/attachment-0002.txt>


More information about the Cplusplus-sig mailing list