@@ -22,11 +22,12 @@ if ! [ python.configured ] && ! ( --without-python in [ modules.peek : ARGV ] )
2222 }
2323}
2424
25- if [ python.configured ] {
26-
2725project boost/python
28- : source-location ../src
29- ;
26+ : source-location ../src
27+ ;
28+
29+ rule cond ( test ? : yes * : no * ) { if $(test) { return $(yes) ; } else { return $(no) ; } }
30+ rule unless ( test ? : yes * : no * ) { if ! $(test) { return $(yes) ; } else { return $(no) ; } }
3031
3132lib boost_python
3233 : # sources
@@ -58,6 +59,7 @@ lib boost_python
5859 wrapper.cpp
5960 import.cpp
6061 exec.cpp
62+ object/function_doc_signature.cpp
6163 : # requirements
6264 <link>static:<define>BOOST_PYTHON_STATIC_LIB
6365 <define>BOOST_PYTHON_SOURCE
@@ -74,19 +76,19 @@ lib boost_python
7476 # python_for_extensions is a target defined by Boost.Build to
7577 # provide the Python include paths, and on Windows, the Python
7678 # import library, as usage requirements.
77- <library>/python//python_for_extensions
78-
79+ [ cond [ python.configured ] : <library>/python//python_for_extensions ]
80+
81+ # we prevent building when there is no python available
82+ # as it's not possible anyway, and to cause dependents to
83+ # fail to build
84+ [ unless [ python.configured ] : <build>no ]
85+
7986 <python-debugging>on:<define>BOOST_DEBUG_PYTHON
80-
8187 : # default build
8288 <link>shared
8389 : # usage requirements
8490 <link>static:<define>BOOST_PYTHON_STATIC_LIB
8591 <python-debugging>on:<define>BOOST_DEBUG_PYTHON
8692 ;
87- }
88- else
89- {
90- ECHO "warning: Python location is not configured" ;
91- ECHO "warning: the Boost.Python library won't be built" ;
92- }
93+
94+ boost-install boost_python ;
0 commit comments