Boost logo

Boost-Build :

Subject: Re: [Boost-build] selecting Python version for Boost.Python
From: Stefan Seefeld (stefan_at_[hidden])
Date: 2018-02-06 22:07:28


On 06.02.2018 16:05, Steven Watanabe via Boost-build wrote:
> AMDG
>
> On 02/06/2018 01:53 PM, Stefan Seefeld via Boost-build wrote:
>> Trying to figure out what the "tag rule" is and how to change (I assume
>> "override" ?) it, I find
>> https://github.com/boostorg/python/blob/develop/build/Jamfile#L110-L111.
>> Can you explain the meaning of those two lines ? (In particular, the
>> second line, featuring "...python-tag".)
>>
> The -<tag> line removes the <tag> that was set in
> Jamroot. python-tag is a function defined in
> boostcpp.jam. (It's imported into Jamroot. The
> ugly mess with BOOST_JAMROOT_MODULE is to handle
> scoping rules.) Actually <tag>@python-tag would
> also work because rules are inherited from parent projects.
> (The -<tag> line can't be changed because -<property>
> is very fragile and relies an exact textual match)

Yuck, that sounds messy.

OK, I'm attempting to simply change the `python-tag` rule (in Jamroot)
to inject the python version (<major><minor>) into the generated name
(if it's a library).
Additionally to that change, I modified Boost.Python's Jamfile to remove
the explicit looping over versions, as per your suggestion:

https://github.com/boostorg/python/commit/ae1875b3ac3e90f68900c1c8fe88fa8556dac2e1

This works, somewhat: If I have a single "using python" statement in my
user-config.jam file, I get libraries "boost_python" and "boost_numpy"
with the expected version suffix.
However, I only get one ! With more than one "using python" statements,
only the first will be built. What am I missing ?
(Oh, and in addition, the build path also doesn't include the python
version any longer, so even if b2 would do the looping implicitly,
different versions of object files would overwrite each other, as per a
bug we discussed recently.)

What is missing ?

Thanks,

Stefan

-- 
      ...ich hab' noch einen Koffer in Berlin...
    



signature.png

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