[Pythonmac-SIG] py2app and qt jpeg plugin

Emanuele Santos emanuelesantos at gmail.com
Thu Sep 20 03:06:42 CEST 2007


Thanks Ronald and Boyd,

This is how I finally fixed the problem:
Put an empty qt.conf inside the bundle's resources folder.
Copy the contents of qt's plugins directory to the bundle's MacOS folder
use install_name_tool on the libraries inside the plugins directory.

After that it found the plugins directory, but it couldn't load them  
because the bundle would still also load the system qt libraries (I  
don't know why) and I would have those QObject::moveToThread errors.

To finally solve this, I had to rename the qt directory so it  
couldn't find the system libraries and load only the bundled ones.

I wish I could help with a recipe for PyQt, but I don't know how to  
make one. What I am doing now is just including sip in py2app  
includes option and PyQt4 in the packages option. Of course, I have  
to copy the plugins and relink them after that.

Can we define in the recipe to tell py2app to include the plugins  
directory?

Thanks again,

-- Emanuele.




On Sep 19, 2007, at 6:22 PM, Boyd Waters wrote:

> Qt4 has an extra directory of image plugins that you need.
>
> These are in ${PREFIX}/lib/qt4-mac
>
> I have to put these inside my application bundle and then use  
> install_name_tool to change the library dependency paths.
>
> I can send more-specific instructions once I get my application  
> working.
>
> - boyd
>
> Boyd Waters
> National Radio Astronomy Observatory
> http://www.aoc.nrao.edu/~bwaters
>
>
>
> On Sep 19, 2007, at 12:15 PM, Ronald Oussoren wrote:
>
>>
>> On 19 Sep, 2007, at 7:14, Emanuele Santos wrote:
>>
>>> Hi,
>>>
>>> I am having problems to show jpeg images on my bundled application
>>> using pyqt4.
>>> I know that the problem is with the qt plugins. How does py2app
>>> handle them? Because if try to run from my source tree it works  
>>> fine.
>>
>> Py2app doesn't handle qt plugins, at least not if they are seperate
>> object files that aren't referenced from python extensions or the  
>> like.
>>
>> Py2app used to have a recipe for correctly handling pyqt application,
>> but that was removed because pyqt changed and nobody volunteered a  
>> new
>> recipe.  We need at least information about how to manually fix the
>> app bundle that py2app creates, but  a complete recipe (like the ones
>> in py2app.recipes) would be even better.
>>
>> Ronald
>>
>> _______________________________________________
>> Pythonmac-SIG maillist  -  Pythonmac-SIG at python.org
>> http://mail.python.org/mailman/listinfo/pythonmac-sig
>



More information about the Pythonmac-SIG mailing list