Skip to content

Commit 7a9a3d3

Browse files
committed
Use the import rule
[SVN r19968]
1 parent 034ca4d commit 7a9a3d3

5 files changed

Lines changed: 13 additions & 17 deletions

File tree

build/Jamfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
subproject libs/python/build ;
1111

1212
# bring in the rules for python
13-
SEARCH on <module@>python.jam = $(BOOST_BUILD_PATH) ;
14-
include <module@>python.jam ;
13+
import python ;
1514

1615
if [ check-python-config ]
1716
{

build/Jamfile.v2

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
import os ;
2+
import modules ;
23

34
# Use a very crude way to sense there python is locatted
45

5-
local PYTHON_PATH ;
6+
7+
local PYTHON_PATH = [ modules.peek : PYTHON_PATH ] ;
8+
ECHO "XXX" $(PYTHON_PATH) ;
69

710
if [ GLOB /usr/local/include/python2.2 : * ]
811
{
@@ -19,7 +22,7 @@ if [ os.name ] in CYGWIN NT
1922
defines = USE_DL_IMPORT ;
2023

2124
# Declare a target for the python interpreter library
22-
lib python : : <name>python2.2.dll ;
25+
lib python : : <name>python22 <search>$(PYTHON_PATH)/libs ;
2326
PYTHON_LIB = python ;
2427
}
2528
else
@@ -35,12 +38,12 @@ if $(PYTHON_PATH) {
3538

3639
project boost/python
3740
: source-location ../src
38-
: requirements <include>$(PYTHON_PATH)/include/python2.2
39-
$(lib_condition)<library-path>$(PYTHON_PATH)/lib/python2.2/config
41+
: requirements <include>$(PYTHON_PATH)/include
42+
$(lib_condition)<library-path>$(PYTHON_PATH)/libs
4043
<link>shared:<library>$(PYTHON_LIB)
4144
<define>$(defines)
4245
: usage-requirements # requirement that will be propageted to *users* of this library
43-
<include>$(PYTHON_PATH)/include/python2.2
46+
<include>$(PYTHON_PATH)/include
4447

4548
# We have a bug which causes us to conclude that conditionalized
4649
# properties in this section are not free.

example/Jamfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ subproject libs/python/example ;
1919
#
2020

2121
# Include definitions needed for Python modules
22-
SEARCH on python.jam = $(BOOST_BUILD_PATH) ;
23-
include python.jam ;
22+
import python ;
2423

2524
# ----- getting_started1 -------
2625

example/tutorial/Jamfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
subproject libs/python/example/tutorial ;
66

77
# Include definitions needed for Python modules
8-
SEARCH on python.jam = $(BOOST_BUILD_PATH) ;
9-
include python.jam ;
8+
import python ;
109

1110
extension hello # Declare a Python extension called hello
1211
: hello.cpp # source

test/Jamfile

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,8 @@
44
#
55
subproject libs/python/test ;
66

7-
# bring in the rules for python
8-
SEARCH on python.jam = $(BOOST_BUILD_PATH) ;
9-
include python.jam ;
10-
# bring in rules for testing
11-
SEARCH on testing.jam = $(BOOST_BUILD_PATH) ;
12-
include testing.jam ;
7+
# bring in the rules for python and testing
8+
import python testing ;
139

1410
# Convenience rule makes declaring tests faster
1511
rule bpl-test ( name ? : files * : requirements * )

0 commit comments

Comments
 (0)