R – Has anyone successfully built a PyObjC app in Snow Leopard

macososx-snow-leopardpy2apppyobjc

If you did, would you mind sharing how you did the pyobjc install? I was trying to do it by installing PythonMac 2.5 (for the standalone bundle thru py2app), and doing easy_install of PyObjC. I always get those deprecated errors, primarily those declared in dyld.h, and inside objc_inject.m.

I tried compiling from source but still no luck.

Also, when I run my Leopard-compiled PyObjC app under Snow Leopard, it has errors concerning PyObjC, first time was it can't see Foundation or AppKit, second was typestr is unknown.

Thanks and appreciate your answers.

Best Answer

If you install the XCode Developer tools (optional Snow Leopard install), there's no need to manually install PyObjC at all. Here's how you can test it:

$ python
Python 2.6.1 (r261:67515, Jul  7 2009, 23:51:51) 
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import Foundation
>>> Foundation.NSString.stringWithString_(u'hello PyObjC')
u'hello PyObjC'
>>> 

If the Foundation, AppKit, ScriptingBridge, modules can be imported, then everything is alright.