Index: libs/python/build/Jamfile.v2
===================================================================
RCS file: /cvsroot/boost/boost/libs/python/build/Jamfile.v2,v
retrieving revision 1.11
diff -u -r1.11 Jamfile.v2
--- libs/python/build/Jamfile.v2 21 Feb 2006 07:38:14 -0000 1.11
+++ libs/python/build/Jamfile.v2 22 Jul 2006 07:08:36 -0000
@@ -59,7 +59,12 @@
: # requirements
static:BOOST_PYTHON_STATIC_LIB
BOOST_PYTHON_SOURCE
- /python//python
+ # We don't link to Python library itself. If
+ # Boost.Python is used for extension, all Python
+ # symbols are available in Python interpreter.
+ # If Boost.Python is used for extending, client
+ # is required to link to /python//python itself.
+ /python//python_for_extensions
: # default build
shared
: # usage requirements
Index: libs/python/test/Jamfile.v2
===================================================================
RCS file: /cvsroot/boost/boost/libs/python/test/Jamfile.v2,v
retrieving revision 1.14
diff -u -r1.14 Jamfile.v2
--- libs/python/test/Jamfile.v2 22 Mar 2006 09:53:34 -0000 1.14
+++ libs/python/test/Jamfile.v2 22 Jul 2006 07:08:36 -0000
@@ -2,11 +2,9 @@
use-project /boost/python : ../build ;
project /boost/python/test ;
-project : requirements multi ;
-
rule py-run ( sources * )
{
- return [ run $(sources) /boost/python//boost_python ] ;
+ return [ run $(sources) /boost/python//boost_python /python//python ] ;
}
rule py-compile ( sources * )
@@ -36,7 +34,7 @@
:
[
- run exec.cpp ../build//boost_python/ static
+ run exec.cpp ../build//boost_python/ static /python//python
: # program args
: exec.py
: # requirements
Index: tools/build/v2/tools/python.jam
===================================================================
RCS file: /cvsroot/boost/boost/tools/build/v2/tools/python.jam,v
retrieving revision 1.22
diff -u -r1.22 python.jam
--- tools/build/v2/tools/python.jam 13 Jul 2006 07:39:58 -0000 1.22
+++ tools/build/v2/tools/python.jam 22 Jul 2006 07:08:36 -0000
@@ -50,6 +50,8 @@
# This contains 'openpty' function need by python. Again, on
# some system need to pass this to linker explicitly.
lib util ;
+# Python uses pthread symbols.
+lib pthread ;
# Initializes the Python toolset.
@@ -129,7 +131,7 @@
flags python.capture-output PYTHON $(condition:J=/) : $(interpreter) ;
}
-
+
local extra-libs ;
switch [ os.name ]
@@ -140,6 +142,16 @@
case * : extra-libs = dl util ;
}
+ # Depending on system, Python library is either static
+ # or shared. When it's static, we need to add 'pthread'
+ # to link line of all clients, otherwise we'll get
+ # unresolved symbols. Same effect can be accomplished
+ # by using multi on the client, but
+ # that can have performance overhead, and is not really
+ # necessary, as Python interface has nothing that's
+ # affected by threading mode.
+ extra-libs += pthread ;
+
# On Linux, we don't want to link either Boost.Python or
# Python extensions to libpython, so that when extensions
# loaded in the interpreter, the symbols in the interpreter
@@ -395,7 +407,8 @@
rule python-extension ( name : sources * : requirements * : default-build * :
usage-requirements * )
{
- requirements += /python//python_for_extensions ;
+ requirements += /python//python_for_extensions
+ darwin:-bundle ;
# TODO: handle the following V1 code
#if $(OS) = MACOSX && $(toolset) = darwin