Skip to content

Commit f005518

Browse files
committed
Fix build system error when Python is not configured, without preventing the BPL target from being declared. Instead the target is now unbuildable, and will be skipped when Python is not configured.
[SVN r40156]
1 parent 274a219 commit f005518

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

build/Jamfile.v2

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ project boost/python
1212
: source-location ../src
1313
;
1414

15+
rule cond ( test ? : yes * : no * ) { if $(test) { return $(yes) ; } else { return $(no) ; } }
16+
rule unless ( test ? : yes * : no * ) { if ! $(test) { return $(yes) ; } else { return $(no) ; } }
17+
1518
lib boost_python
1619
: # sources
1720
numeric.cpp
@@ -60,7 +63,12 @@ lib boost_python
6063
# python_for_extensions is a target defined by Boost.Build to
6164
# provide the Python include paths, and on Windows, the Python
6265
# import library, as usage requirements.
63-
<library>/python//python_for_extensions
66+
[ cond [ python.configured ] : <library>/python//python_for_extensions ]
67+
68+
# we prevent building when there is no python available
69+
# as it's not possible anyway, and to cause dependents to
70+
# fail to build
71+
[ unless [ python.configured ] : <build>no ]
6472

6573
: # default build
6674
<link>shared

0 commit comments

Comments
 (0)