Boost logo

Boost :

Subject: Re: [boost] doubts about python3 support
From: Neal Becker (ndbecker2_at_[hidden])
Date: 2013-08-26 14:26:51


Petr Machata wrote:

> Neal Becker <ndbecker2_at_[hidden]> writes:
>
>> What I'd like is to build both python2 and python3 from the same source tree,
>> installing the final shared libs into the same destination dir. Right now I
>> have 2 different source trees, and build switching the one line in user-
>> config.jam.
>
> In Fedora, I add the Python 3 like you do, and then additionally add
> e.g. python=2.7 to the b2 command line. This then builds a
> libboost_python.so vs. Python 2 and libboost_python3 vs. Python 3.
>
> My theory is that when Python 2 to Python 3 transition is eventually
> done, you still want to build libbost_python (sans 3), because lots of
> apps will still use -lboost_python. But by that time it will be
> desirable to have libboost_python built vs. Python 3.
>
> Thanks,
> PM

I'm not quite clear on your procedure. Adding python=2.7 to command line(having
modified user-config.jam as described):

bjam -d+2 -j8 cxxflags='-march=native -Wno-unused-local-typedefs' -sHAVE_ICU=1 -
sEXPAT_INCLUDE=/usr -sEXPAT_LIBPATH=/usr/lib64 --layout=tagged
threading=single,multi link=shared stage python=2.7

/usr/local/src/boost_1_54_0.python3/tools/build/v2/build/feature.jam:493: in
feature.validate-value-string from module feature
error: "2.7" is not a known value of feature <python>
error: legal values: "3.3"
/usr/local/src/boost_1_54_0.python3/tools/build/v2/build/property.jam:273: in
validate1 from module property
/usr/local/src/boost_1_54_0.python3/tools/build/v2/build/property.jam:299: in
property.validate from module property
/usr/local/src/boost_1_54_0.python3/tools/build/v2/build/build-request.jam:216:
in convert-command-line-element from module build-request
/usr/local/src/boost_1_54_0.python3/tools/build/v2/build/build-request.jam:154:
in build-request.from-command-line from module build-request
/usr/local/src/boost_1_54_0.python3/tools/build/v2/build-system.jam:583: in load
from module build-system
/usr/local/src/boost_1_54_0.python3/tools/build/v2/kernel/modules.jam:289: in
import from module modules
/usr/local/src/boost_1_54_0.python3/tools/build/v2/kernel/bootstrap.jam:139: in
boost-build from module
/usr/local/src/boost_1_54_0.python3/boost-build.jam:17: in module scope from
module


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk