mirror of
https://github.com/boostorg/build.git
synced 2026-02-14 12:42:11 +00:00
Fix not having a default python interpreter version on targets.
This change adds a toolset requirement that sets the python version feature of the first configured python for a given target OS (usually the host OS). This allows to correctly configure different python interpreters for different target OSes.
This commit is contained in:
@@ -900,6 +900,17 @@ local rule configure ( version ? : cmd-or-prefix ? : includes * : libraries ? :
|
||||
toolset.add-requirements
|
||||
$(target-requirements:J=,):<python.interpreter>$(interpreter-cmd) ;
|
||||
|
||||
# We also set a default requirement that assigns the first python configured
|
||||
# for a particular target OS as the default. This makes it so that we can
|
||||
# select a python interpreter with only knowledge of the target OS. And hence
|
||||
# can configure different Pythons based on the target OS only.
|
||||
local toolset-requirements = [ toolset.requirements ] ;
|
||||
local default-python-requirement = <target-os>$(target-os):<python>$(version:E=default) ;
|
||||
if ! [ $(toolset-requirements).contains-raw $(default-python-requirement) ]
|
||||
{
|
||||
toolset.add-requirements $(default-python-requirement) ;
|
||||
}
|
||||
|
||||
# Register the right suffix for extensions.
|
||||
register-extension-suffix $(extension-suffix) : $(target-requirements) ;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user