2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-19 02:12:17 +00:00

Make sure sys.platform isn't required

Update darwin handler so it will fall back to the standard *nix method
if Python isn't installed as a framework.


[SVN r37211]
This commit is contained in:
Dave Abrahams
2007-03-16 23:26:35 +00:00
parent 444fa3c254
commit 549a94389e

View File

@@ -622,7 +622,7 @@ local rule system-library-dependencies ( target-os )
# Declare a target to represent Python's library, returning the target
# name.
local rule declare-libpython-target ( version ? : sys.platform : requirements * )
local rule declare-libpython-target ( version ? : sys.platform ? : requirements * )
{
# Compute the representation of Python version in the name of
# Python's library file.
@@ -804,17 +804,35 @@ local rule configure (
}
}
# Declare the "python" target. This should really be called python_for_embedding
# See if we can find a framework directory on darwin
local framework-directory ;
if $(target-os) = darwin
{
# Search upward for the framework directory
local fwk = $(libraries[-1]) ;
while $(fwk:D=) && $(fwk:D=) != Python.framework
local framework-directory = $(libraries[-1]) ;
while $(framework-directory:D=) && $(framework-directory:D=) != Python.framework
{
fwk = $(fwk:D) ;
framework-directory = $(framework-directory:D) ;
}
debug-message framework directory is \"$(fwk)\" ;
if $(framework-directory) = Python.framework
{
debug-message framework directory is \"$(fwk)\" ;
}
else
{
debug-message no framework directory found; using library path ;
framework-directory = ;
}
}
#
# Declare the "python" target. This should really be called
# python_for_embedding
#
if $(framework-directory)
{
alias python
:
: $(target-requirements)