Hi Steven, On 08.12.2017 21:52, Steven Watanabe via Boost wrote:
AMDG
On 12/08/2017 07:36 PM, Stefan Seefeld via Boost wrote:
That sounds tricky.
Does that mean that I'd need to modify my user-config.jam file between the two builds? (I.e. only have one version of python in there at a time?) I believe so, yes (though would prefer someone like Steven or Rene as
On 08.12.2017 21:32, Tom Kent via Boost wrote: the real experts to confirm the whole issue, as I may miss something).
I'm not really familiar with the python toolset, but user-config.jam can contain arbitrary code, so, if there isn't a better solution, you can fall back on something like this:
# Adjust the build paths when python3 is in use. # Note: This applies to all targets, even those # unrelated to python, so it's probably a bad idea # to use the --use-python3 option for building anything # other than Boost.Python. import feature ; feature.feature python-version : 3 : propagated optional ;
import modules ; import toolset ; # Allow command line switching if --use-python3 in [ modules.peek : ARGV ] { project : requirements <python-version>3 ; using python : 3.xx : ... ; } else { using python : 2.xx : ... ; }
Can you elaborate a bit on what this will achieve ? It seems this simply means the same user-config.jam file can be reused for two `b2` invocations (one with `--use-python3` and one without). But the build logic would still need to be augmented to: 1) run `b2` as before 2) remove the build tree for Boost.Python, i.e. everything under `bin.v2/libs/python` 3) rerun `b2`, this time with additional `--use-python3 --with-python` arguments, to only rebuild Boost.Python, this time with Python3. 4) collect all binaries from the staging area during packaging. Correct ? Thanks, Stefan -- ...ich hab' noch einen Koffer in Berlin...