[Pythonmac-SIG] Upgraded to 2.4 and can't make it work

Bob Ippolito bob at redivi.com
Fri May 27 18:27:49 CEST 2005


On May 27, 2005, at 6:31 AM, Kent Quirk wrote:

> I can't find where you said that extensions shouldn't be linking to
> Python at all. I also can't understand how this could be the case, at
> least if we're building the extensions using Boost.Python (which we
> are).

When I said it shouldn't be linking to Python, I also said what  
linker flags should be used:  -undefined dynamic_lookup

> I've tried to build without linking to it, and it compiles but I  
> end up
> with a bunch of missing symbols from Python.
>
> When we started this whole project about a year and a half ago,
> distutils basically didn't work. We now have several extensions and  
> over
> 100K lines of complex C++ code distributed in several hundred files  
> in a
> cross-platform application. We had a difficult enough time getting  
> XCode
> to handle it. After staring at what passes for distutils documentation
> for a while, I can't even figure out if it will handle a Boost.Python
> extension, and trying to get it to do our complete build seems like
> great way to waste several days.
>
> We finally did it manually. After the call to setup(), our setup.py
> iterates over the constructed modules in the built .app using macholib
> to find all the occurrences of /Libraries/Frameworks/Python.framework
> etc and convert them to @executable_path/../Frameworks.
>
> What I had hoped for was some hint along the lines of "here's how you
> can convince py2app to do that for you automatically."

It should do it automatically, but you shouldn't have those  
references in the first place.  So, there is a problem somewhere, but  
the obvious solution to that particular problem is to link the  
extensions correctly.

> OS X documentation is generally of the class that you only know  
> what you
> need to know after you've already found it (and tried a zillion wrong
> answers). It's really pretty horrible to figure this stuff out for the
> first time.

Which is why I always recommend to stick to a path where disutils and  
py2app do all the work...

-bob



More information about the Pythonmac-SIG mailing list