Boost logo

Boost Testing :

From: Doug Gregor (dgregor_at_[hidden])
Date: 2006-07-19 17:00:15


On Jul 19, 2006, at 8:07 AM, Vladimir Prus wrote:

> Doug Gregor wrote:
>
>>
>> On Jul 12, 2006, at 6:55 PM, David Abrahams wrote:
>>
>>>
>>> http://engineering.meta-comm.com/boost-regression/CVS-RC_1_34_0/
>>> developer/output/OSL-V2-boost-bin-v2-libs-python-test-exec-test-
>>> darwin-4-0-1-debug-threading-multi_release.html
>>>
>>> Seems to indicate the Python framework isn't installed where it
>>> should
>>> be? I'm not set up to do local tests of Boost on Darwin at the
>>> moment
>>> (soon though), so I can't say for sure, but this looks like a
>>> configuration error.
>>
>> I've tweaked the configuration, so now we're a bit closer. The tests
>> give errors like this:
>>
>> File "staticmethod.py", line 5, in __main__
>> Failed example:
>> from staticmethod_ext import *
>> Exception raised:
>> Traceback (most recent call last):
>> File "/Library/Frameworks/Python.framework/Versions/2.4/lib/
>> python2.4/doctest.py", line 1243, in __run
>> compileflags, 1) in test.globs
>> File "<doctest __main__[0]>", line 1, in ?
>> from staticmethod_ext import *
>> ImportError: Inappropriate file type for dynamic loading
>>
>> I think the remaining problem is that someone needs TO DO this TODO:
>>
>> # TODO: handle the following V1 code
>> #if $(OS) = MACOSX && $(toolset) = darwin
>> #{
>> # if <target-type>PYD in $(properties)
>> # {
>> # properties += <link-format>bundle ;
>> # }
>> # properties += <framework>$(PYTHON_FRAMEWORK) ;
>> #}
>
> I thin <framework> is already taked care of. Should <link-
> format>bundle be
> applied when building extension itself?

Yes.

> The above error seem to indicate
> there's a problem with format of extension.

Right. Python extension modules should be built at bundles, not dulibs.

> Should it really be a bundle? Can you try the attached patch?

Sure. It doesn't seem to be adding the "-bundle", though:

     g++ -dynamiclib -o "../../../bin.v2/libs/python/test/
properties.test/darwin
-4.0.1/debug/threading-multi/properties_ext.so" "../../../bin.v2/libs/
python/tes
t/properties.test/darwin-4.0.1/debug/threading-multi/properties.o"
"../../../bin
.v2/libs/python/build/darwin-4.0.1/debug/threading-multi/
libboost_python-40-mt-g
d-1_34.dylib" -framework Python -g

My patch is a little different from yours, because I have some fixes
for the handling of PYTHON_FRAMEWORK. The <framework> option should
always just get "Python"; the path should be given in a separate -F
option.

        Doug

Index: python.jam
===================================================================
RCS file: /cvsroot/boost/boost/tools/build/v2/tools/python.jam,v
retrieving revision 1.12.2.4
diff -u -r1.12.2.4 python.jam
--- python.jam 4 Jun 2006 06:56:19 -0000 1.12.2.4
+++ python.jam 19 Jul 2006 20:57:30 -0000
@@ -228,7 +228,7 @@
      {
          PYTHON_FRAMEWORK = $(PYTHON_FRAMEWORK:D) ;
      }
- PYTHON_FRAMEWORK = $(PYTHON_FRAMEWORK:D)/Python ;
+ PYTHON_FRAMEWORK = $(PYTHON_FRAMEWORK:D) ;
      alias python_for_extensions
        :
@@ -241,7 +241,7 @@
        :
        : <os>MACOSX <toolset>darwin
        :
- : <include>$(includes) <framework>$(PYTHON_FRAMEWORK)
+ : <include>$(includes) <linkflags>-F$(PYTHON_FRAMEWORK)
<framework>Python
        ;
}
@@ -400,7 +400,8 @@
rule python-extension ( name : sources * : requirements * : default-
build * :
                          usage-requirements * )
{
- requirements += <use>/python//python_for_extensions ;
+ requirements += <use>/python//python_for_extensions
+ <toolset>darwin:<linkflags>-bundle ;

      # TODO: handle the following V1 code
      #if $(OS) = MACOSX && $(toolset) = darwin


Boost-testing list run by mbergal at meta-comm.com