On Mon, Feb 13, 2017 at 9:35 AM, Stefan Seefeld via Boost-build <boost-build@lists.boost.org> wrote:
Hello,

having learned a bit more about Boost.Build and its internals, I'm
trying to apply my understanding.


My user-config.jam file contains

  using python : 2.7 ;
  using pyhon : 3.5 ;

Then I issue this command:

  ./b2 --with-python python=2.7


Inside my Jamfile, I see that `feature.values python` reports "2.7 3.5",
independently on what I specify on the command-line. So it seems I'm
missing something:

What is b2's interpretation of the above user-config.jam file ?
And what does it mean to provide the `python=2.7` option on the
command-line ?

How can I specify that I want to

* build with Python 2.7 only
* build with Python 3.5 only
* build both variants at the same time

I would like to add to this question. On windows we often intermingle 32-bit and 64-bit builds. Is it correct to setup my user-config.jam as:

using python
: 2.7 # version
: C:\\Python27-32\\python.exe # Interperter/path to dir
: C:\\Python27-32\\include # includes
: C:\\Python27-32\\libs # libs
: <address-model>32 # conditions
;

using python
: 2.7 # version
: C:\\Python27-64\\python.exe # Interperter/path to dir
: C:\\Python27-64\\include # includes
: C:\\Python27-64\\libs # libs
: <address-model>64 # conditions
;

using python 
: 3.5 # version 
: C:\\Python35-32\\python.exe # Interperter/path to dir 
: C:\\Python35-32\\include # includes 
: C:\\Python35-32\\libs # libs 
: <address-model>32 # conditions 


using python 
: 3.5 # version 
: C:\\Python35-64\\python.exe # Interperter/path to dir 
: C:\\Python35-64\\include # includes 
: C:\\Python35-64\\libs # libs 
: <address-model>64 # conditions 
;

I've fought with both of these issues before (multiple versions and multiple architectures on the same PC) but never had a good understanding of if I was doing things correctly or if they were working as I assumed.

Thanks,
Tom