[Pythonmac-SIG] py2app error

Christopher Barker Chris.Barker at noaa.gov
Mon Aug 2 03:27:05 CEST 2010


Ronald Oussoren wrote:
>> This is a problem in general with all ctypes uses. In fact, ctypes
>> reminds me a bit of py2app in the sense that it has some built-in
>> algorithms for searching for dynamic libs, and that these fail fairly often.
> 
> Please file bugs for that, I'm pretty sure that ctypes is supposed to
> implement the same algoritms as the platform dynamic linker.

IIUC, on OS-X, the full path to a dll is specified when linked -- it 
sure seems that way.

So there is no "normal search path".  But anyway, what I've seen is 
pacakges that don't find macports stuff, etc.

I've had to patch the package to make it work at all -- I haven't tried 
to us py2app on any of those yet though. When I do, I'll post a bug 
report here, though.

> W.r.t. py2app: I consider cases where py2app doesn't find modules or
> shared libraries bugs and should be fixed, either by making the core
> smarter or by adding recipes.   Please post reports about issues,
> especially when you can reproduce them in smallish examples (or at
> least examples that you can share with the outside world).

will do.

But there aer some cases where dynamic importing is simpily goign to 
fail, and you can get a lot of those covered with recipes that bring in 
big 'ol packages that aren't needed, but I'm not sure I always want that.

And if the dynamic import is part of your own code, then it shouldn't be 
a recipe anyway.

But yes, the mainstream packages should all "just work".

>> As for py2app, maybe the ctypes recipe could patch ctypes to look
>> in a particular place in the bundle, and then the user could
>> specify which libs ctypes used, and py2ap would put them in the
>> bundle.
> 
> Yes, but that will require some additional trickery to ensure that
> ctypes looks in this special location before looking at the full name
> specified by the caller.

yup. Maybe not worth it.

> Actually finding which libraries are loaded using ctypes will sadly
> enough be impossible in general, although recipes could be used for
> the popular libaries.

Agreed.

Thanks,

-Chris


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov


More information about the Pythonmac-SIG mailing list