Il giorno Fri, 27 Feb 2009 19:01:45 +0100 Giovanni Bajo <[email protected]> ha scritto:
> > On 2/27/2009 6:33 PM, Antonio Valentino wrote: > > ----- Original Message ----- > > From: "Giovanni Bajo" <[email protected]> > > To: <[email protected]> > > Sent: Friday, February 27, 2009 4:24 PM > > Subject: [PyInstaller] Re: PyQt4 and Qt plugins (imageformats, > > etc.) fully supported now > > > > > >> On 2/27/2009 3:21 PM, Antonio Valentino wrote: > >>> On 23 Feb, 12:33, Giovanni Bajo <[email protected]> wrote: > >>>> Hello, > >>>> > >>>> I've just added a new feature to PyInstaller: a module hook is > >>>> now able to specify additional data files that are needed for > >>>> the module to work correctly. Those data files are automatically > >>>> collected when using > > > > [cut] > > > >>> Hi Giovanni, > >>> I'm trying the new pyinstaller-trunk on my PyQt based project. > >>> The new hoks seems to fail collecting Qt4 plugins because > >>> > >>> hooks.hookutils.qt4_plugins_dir() > >>> > >>> returns > >>> > >>> "C:\Qt\4.4.1\plugins" > >>> > >>> > >>> while the correct plugins location on my system is > >>> > >>> "C:\Python25\Lib\site-packages\PyQt4\plugins" > >>> > >>> I don't have Qt4 installed. I just used the standard PyQt4 > >>> installer provided by riverback. > >>> It seems to me a PyQt4 build issue and i can't figure out wich is > >>> the best approach to solve this problem. > >>> > >>> Do you have any idea? > >> It looks like PyQt's installer installs a qt.conf file specifying > >> the plugin paths. Can you find a way to query that directory > >> without having to parse qt.conf? > > > > Giovanni, > > I don't know how to perform that query. Maybe I could ask on the > > pyqt mailing list. > > Anyway qt.path is (on my PC) in > > > > C:\Python25\Lib\site-packages\PyQt4 > > > > so I guess i could use something like > > > > In [5]: PyQt4.__file__ > > Out[5]: 'C:\\Python25\\lib\\site-packages\\PyQt4\\__init__.pyc' > > > > In [6]: PyQt4.__path__ > > Out[6]: ['C:\\Python25\\lib\\site-packages\\PyQt4'] > > > > to build the path. > > I don't know if that is the standard place where qt.conf is put. > > > > The content of the file is > > > > [Paths] > > Prefix = C:/Python25/Lib/site-packages/PyQt4 > > Binaries = . > > > > so it shouldn't be a problem to parse it. > > Why do you prefer avoid parsing? > > Because the point is that I should ask Qt (through PyQt) where the > plugins are; otherwise, PyInstaller's hooks would have to reproduce > all the logic that Qt does to discover possible plugin paths (which > are arbitrarly complex, vary arbitrarly through versions, etc.). I > don't want to duplicate all that code: there must be a way to ask Qt > where it is looking for plugins. Giovanni, if my understanding of http://doc.trolltech.com/4.4/qt-conf.html is correct the "way to ask Qt where it is looking for plugins" exists and it is exactly the one you used in hookutils. The problem is, IMHO, that something is broken somewhere so the best we can do is detect the failure and try some sort of workaroud. > I'll investigate further. -- Antonio Valentino --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "PyInstaller" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/PyInstaller?hl=en -~----------~----~----~----~------~----~------~--~---
