Boost logo

Boost :

Subject: [boost] [boost-python, boost-build] building "hello" boost-python tutorial sample with python 3.2 on Archlinux
From: Roland Puntaier (roland.puntaier_at_[hidden])
Date: 2012-10-10 17:49:26


Today I have tried boost-python tutorial with Arch Linux and Python3.2.
In case somebody else tries this, here are the problems that I've

- I've created ~/user-config.jam with this line
    using python : 3.2 : /usr/bin/python ;

- the current boost-build of arch is 2.0_m12-3
   This still uses "print" without "(" in boost-build/tools/python.jam
   The nightly build of boost-build has it corrected:

         local full-cmd =
             $(python-cmd)" -c \"from sys import *;
print('"$(format:J=\\n)"' % ("$(exprs:J=,)"))\"" ;

- Arch has python3.2 includes in /usr/include/python3.2mu (I wonder why!)
   This is not detected by b2 / bjam.
   I worked around this by changing boost-build/tools/python.jam:

         includes ?= $(prefix)/include/python$(version)mu ;

- the sample jamroot file in the tutorial
   assumes a boost root folder.
   Since boost include and lib are separate with the arch boost
   I've commented out "use-project".
   Then I had to give a direct reference to

        diff -u Jamroot
        --- 2012-10-10 22:21:32.928426203 +0200
        +++ Jamroot 2012-10-10 22:23:15.318762363 +0200
        @@ -13,14 +13,13 @@

          # Specify the path to the Boost project. If you move this
          # adjust this path to refer to the Boost root directory.
        -use-project boost
        - : ../../../.. ;
        +#use-project boost : ../../../.. ;

          # Set up the project-wide requirements that everything uses the
          # boost_python library from the project whose global ID is
          # /boost/python.
        - : requirements <library>/boost/python//boost_python ;
        + : requirements <library>/usr/lib/ ;

          # Declare the three extension modules. You can specify multiple
          # source files after the colon separated by spaces.

   It would be great to have comments pointing to the right solution
   for python 3.2 and an installed boost directly in the tutorial's
sample jamroot file.

- Roland

Boost list run by bdawes at, gregod at, cpdaniel at, john at