Skip to content

Commit b8937d0

Browse files
committed
Relieve need to explicitly configure Python
[SVN r37382]
1 parent 4827ae7 commit b8937d0

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

build/Jamfile.v2

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,22 @@ import modules ;
77

88
import python ;
99

10-
if [ python.configured ] {
10+
if ! [ python.configured ] && ! ( --without-python in [ modules.peek : ARGV ] )
11+
{
12+
# Attempt default configuration of python
13+
import toolset : using ;
14+
using python ;
1115

16+
if ! [ python.configured ]
17+
{
18+
ECHO "WARNING: No python installation configured and autoconfiguration" ;
19+
ECHO " failed. See http://www.boost.org/libs/python/doc/building.html" ;
20+
ECHO " for configuration instructions or pass --without-python to" ;
21+
ECHO " suppress this message and silently skip all Boost.Python targets" ;
22+
}
23+
}
24+
25+
if [ python.configured ] {
1226

1327
project boost/python
1428
: source-location ../src

example/Jamroot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@ run-test test3 : std_pair_ext test_std_pair.py ;
3535
# A target that runs all the tests
3636
alias test : test1 test2 test3 ;
3737

38-
# Don't run tests by default
38+
# Only run tests when explicitly requested
3939
explicit test test1 test2 test3 ;
4040

0 commit comments

Comments
 (0)