Re: [Pyobjc-dev] PyObjC & Python 2.4
Brought to you by:
ronaldoussoren
From: Bob I. <bo...@re...> - 2004-07-30 22:20:02
|
On Jul 30, 2004, at 5:02 PM, Ronald Oussoren wrote: > Hi all, > > I've just checked in two patches that make it possible to run the > PyObjC unittests with Python2.4. > > One patch disables one unittests that tickles a bug in Carbon.CF > (python bug 1000914), the other removes the call to pathForFramework > in ScreenSaver/__init__.py. > > Could someone please explain why this call (and simular calls in other > packages) are necessary? They look pretty useless. Likewise for the > entire objc._dyld and objc._framework modules. They're not useless, they mimic the behavior of compile time linking with dyld by respecting the dyld environment variables and using the framework search paths. This allows you to load profile or debugging versions of frameworks, use alternate frameworks by setting the DYLD environment variables, etc. It also allows the frameworks to be found by name only if they're not in the expected location (or if the expected location is not given). pathForFramework will also help with GNUstep portability by providing an alternate implementation that uses the GNUstep root to find frameworks and such. I don't understand why pathForFramework needed to be removed.. it should return the input string for each case in the PyObjC source code. Could you please show me a traceback or something? >>> from objc import pathForFramework >>> pathForFramework('Foundation.framework') '/System/Library/Frameworks/Foundation.framework' >>> pathForFramework('SDL.framework') '/Users/bob/Library/Frameworks/SDL.framework' -bob |