mirror of
https://github.com/boostorg/python.git
synced 2026-01-30 20:12:37 +00:00
Merge from trunk.
[SVN r40260]
This commit is contained in:
@@ -12,6 +12,9 @@ project boost/python
|
||||
: source-location ../src
|
||||
;
|
||||
|
||||
rule cond ( test ? : yes * : no * ) { if $(test) { return $(yes) ; } else { return $(no) ; } }
|
||||
rule unless ( test ? : yes * : no * ) { if ! $(test) { return $(yes) ; } else { return $(no) ; } }
|
||||
|
||||
lib boost_python
|
||||
: # sources
|
||||
numeric.cpp
|
||||
@@ -60,7 +63,12 @@ lib boost_python
|
||||
# python_for_extensions is a target defined by Boost.Build to
|
||||
# provide the Python include paths, and on Windows, the Python
|
||||
# import library, as usage requirements.
|
||||
<library>/python//python_for_extensions
|
||||
[ cond [ python.configured ] : <library>/python//python_for_extensions ]
|
||||
|
||||
# we prevent building when there is no python available
|
||||
# as it's not possible anyway, and to cause dependents to
|
||||
# fail to build
|
||||
[ unless [ python.configured ] : <build>no ]
|
||||
|
||||
: # default build
|
||||
<link>shared
|
||||
|
||||
@@ -2,12 +2,20 @@
|
||||
# Software License, Version 1.0. (See accompanying
|
||||
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
import python ;
|
||||
|
||||
use-project /boost/python : ../build ;
|
||||
project /boost/python/test ;
|
||||
|
||||
local PY = ;
|
||||
if [ python.configured ]
|
||||
{
|
||||
PY = /python//python ;
|
||||
}
|
||||
|
||||
rule py-run ( sources * : input-file ? )
|
||||
{
|
||||
return [ run $(sources) /boost/python//boost_python /python//python
|
||||
return [ run $(sources) /boost/python//boost_python $(PY)
|
||||
: # args
|
||||
: $(input-file)
|
||||
: #requirements
|
||||
@@ -39,7 +47,7 @@ test-suite python
|
||||
:
|
||||
|
||||
[
|
||||
run exec.cpp ../build//boost_python/<link>static /python//python
|
||||
run exec.cpp ../build//boost_python/<link>static $(PY)
|
||||
: # program args
|
||||
: exec.py
|
||||
: # requirements
|
||||
@@ -183,7 +191,7 @@ bpl-test crossmod_opaque
|
||||
:
|
||||
:
|
||||
: <define>BOOST_PYTHON_STATIC_LIB
|
||||
<use>/python//python
|
||||
<use>$(PY)
|
||||
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user