[Pythonmac-SIG] Py2app working with PyQt, PyOpenGL applications?

Huaicai Mo huaicai at nanorex.com
Fri Nov 19 16:56:50 CET 2004


Hello,

I am trying to use py2app to build an application bundle distribution on Mac
OS X. I got some problems, I wonder if any one has similar experiences or
any ideas for these?

My Mac OS X is 10.2.8. I built py2app from source, since the py2app-0.1.5
installation package needs 10.3 installer. My software uses PyQt, PyOpenGL
packages. Same as py2exe, py2app can't find the "sip" module, which is used
by PyQt,  so I add the option: "--includes sip", this works fine, but the
problem is when I run the application, I got an error:
IOError: [Errno20] Not a directory:
'../Contents/Resources/Python/site-packages.zip/OpenGL/version'.  

I tried to add the file 'version' from OpenGL directory to site-packages.zip
and extract the zip file into a directory called site-packages.zip, the
above error disappeared, but I got an new error: 
QPaintDevice: Must construct a Qapplication before a QPaintDevice.  My
application works fine and doesn't have such errors if I just start it from
a shell window like: pythonw ../myapp.py.

I also tried  "--excludes OpenGL" module and then manually copy the OpenGL
directory  from Python.frameworks to "site-pakcages.zip" and "lib-dynload"
directories, the trick that I used for py2exe on Windows, but it seems this
is not working here: " Fatal Python error: Interpreter not initialized
(Version mismatch?) "
 
Please share your experience or ideas if you may have some for those
problems. Thanks a lot.

huaicai

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20041119/7decd3a1/attachment.html


More information about the Pythonmac-SIG mailing list