[Pythonmac-SIG] py2app, PyQt4, jpg converter plugin

tangle1 at mindspring.com tangle1 at mindspring.com
Fri Jun 26 16:44:51 CEST 2009


I used py2app to convert my mac python/PyQt script to a mac app. Everything works except for cache/display of jpg images.

I confirmed with diagnostic code: 
- QImage(path to jpg) returns null image 
- 'jpg','jpeg' are not in list returned by QImageReader.supportedImageFormats()

The jpgs ARE cached and displayed if I run the same script from python interpreter.

I used macports to install components and then ran "python setup.py py2app"

I have seen previous posts on this issue. However solution does not appear to be spelled out. I am not an experienced mac/python developer, but I need to get this last critical step working. Any help would be greatly appreciated!!

... I know the alternative is to do separate XCode,Qt,sip,PyQt installs on every Mac in our facility (sigh)

Here is a copy of setup.py: (I copied from http://www.rkblog.rk.edu.pl/w/p/building-mac-os-x-applications-py2app/)
----------------------------------------------------------------------
from setuptools import setup

APP = ['mvrv.py']
OPTIONS = {'argv_emulation': True, 'includes': ['sip','PyQt4._qt','PyQt4.QtCore','PyQt4.QtGui'],
			'excludes':['PyQt4.QtDesigner','PyQt4.QtNetwork','PyQt4.QtOpenGl','PyQt4.QtScript','PyQt4.QtSql','PyQt4.QtTest','PyQt4.QtWebKit','PyQt4.QtXml','PyQt4.phonon']}
			
setup(
	app=APP,
	options={'py2app': OPTIONS},
	setup_requires=['py2app'],
)
----------------------------------------------------------------------

Thanks!

Suzanne


More information about the Pythonmac-SIG mailing list