Dear Boost Developers,

I'd like to compile Boost 1.65.1 with Python 3.5 support on Windows with VS 2015. Python is installed from x64 Anaconda distribution into a so called python virtual environment (along with v3.6 in the default environment).

I created the following user-config.jam in tools/build/src:

 using python 
      : 3.5  # Version
      : C:\\ProgramData\\Anaconda3\\envs\\python-35\\python.exe  # Interpreter
      : C:\\ProgramData\\Anaconda3\\envs\\python-35\\include  # include directory
      : C:\\ProgramData\\Anaconda3\\envs\\python-35\\libs  # link libraries
      : <address-model>64  # conditions
      ;
 
After executing ./bootstrap.bat (with no options given to it), I call the compiled b2.exe the following way:

    b2.exe -j 16 --debug-configuration  \
      --prefix=<my_boost_lib_dir> -sBOOST_ROOT=<my_boost_dir> \
      threading=multi variant=debug,release link=static runtime-link=static \
      address-model=64 optimization=speed toolset=msvc \
      --with-python  <--with-[...]> \
      install
 
My problem is the resulting .lib libraries somehow contain references to python36.lib (and not to python35.lib):
$> dumpbin.exe /directives libboost_python3-vc140-mt-s-1_65_1.lib | findstr python3
   /DEFAULTLIB:python36.lib
   /DEFAULTLIB:python36.lib
   /DEFAULTLIB:python36.lib
   /DEFAULTLIB:python36.lib
   /DEFAULTLIB:python36.lib
   [...]

b2 outputs the following:
[python-cfg] Configuring python...
[python-cfg]   user-specified version: "3.5"
[python-cfg]   user-specified cmd-or-prefix: "C:\ProgramData\Anaconda3\envs\python-35\python.exe"
[python-cfg]   user-specified includes: "C:\ProgramData\Anaconda3\envs\python-35\include"
[python-cfg]   user-specified libraries: "C:\ProgramData\Anaconda3\envs\python-35\libs"
[python-cfg]   user-specified condition: "<address-model>64"
[python-cfg] Checking interpreter command "C:\ProgramData\Anaconda3\envs\python-35\python.exe"...
[python-cfg] running command 'DIR /-C /A:S "C:\ProgramData\Anaconda3\envs\python-35\python.exe" 2>&1'
[python-cfg] running command 'C:\ProgramData\Anaconda3\envs\python-35\python.exe -c "from sys import *; print('version=%d.%d\nplatform=%s\nprefix=%s\nexec_prefix=%s\nexecutable=%s' % (version_info[0],version_info[1],platform,prefix,exec_prefix,executable))" 2>&1'
[python-cfg] ...requested configuration matched!
[python-cfg] Details of this Python configuration:
[python-cfg]   interpreter command: "C:\ProgramData\Anaconda3\envs\python-35\python.exe"
[python-cfg]   include path: "C:\ProgramData\Anaconda3\envs\python-35\include"
[python-cfg]   library path: "C:\ProgramData\Anaconda3\envs\python-35\libs"
[python-cfg]   DLL search path: "C:\ProgramData\Anaconda3\envs\python-35"
[python-cfg] Checking for NumPy...
[python-cfg] running command 'C:\ProgramData\Anaconda3\envs\python-35\python.exe -c "import sys; sys.stderr = sys.stdout; import numpy; print(numpy.get_include())"'
[python-cfg] NumPy enabled

Do you have any idea how to enable linking to Python 3.5?

Thank you very much!

All the best,

Ákos