Hi,
I'm currently writing a small python app that embeds cherrypy and django using py2app.
It worked well until I tried to include pyobjc in my project, since my app needed a small GUI (which consists of a small icon in the top menu bar + a drop down menu).
I can run my python script without any problem (I'm using python 2.6 with macports), but I can't launch the application bundle generated by py2app.
A dialog box appears with the following message:
ImportError:
dlopen(/Users/denis/tlon/standalone/mac/dist/django_cherry.app/Contents/Resources/lib/python2.6/lib-dynload/CoreFoundation/_inlines.so, 2): no suitable image found.
Did find:
/Users/denis/tlon/standalone/mac/dist/django_cherry.app/Contents/Resources/lib/python2.6/lib-dynload/CoreFoundation/_inlines.so: mach-o, but wrong architecture
I did a quick :
sudo port -u install py26-pyobjc +universal
but for some reason macports tries to build openssl, with which compilation fails each time.
It seems the problem is related to zLib - this is what appears in the logs :
:info:build ld: warning: in /opt/local/lib/libz.dylib, file is not of required architecture
...And here is the output of file /opt/local/lib/libz.dylib :
/opt/local/lib/libz.dylib: Mach-O universal binary with 2 architectures
/opt/local/lib/libz.dylib (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64
/opt/local/lib/libz.dylib (for architecture i386): Mach-O dynamically linked shared library i386
Nothing looks wrong to me.
I'm a bit stuck here.
I don't even understand what openssl has to do with pyObjc, but it looks like I can't go anywhere if I don't manage to compile it. Macports really suck sometimes :/
EDIT I manage to fix Macports issue, but not py2app one. If I get it right, py2app try to create a 32-bits app, while Core Foundation files on Snow Leopard are for 64 bits architectures. Damn. Either I build this on Leopard, either I have to find a way to create a 64bit app with py2app, but then Snow Leopard only.