[PyQt] PyQt4 and Qt plugins (imageformats, etc.) fully supported now

Arthur Pemberton pemboa at gmail.com
Sat Mar 7 21:38:06 GMT 2009


On Mon, Feb 23, 2009 at 5:33 AM, Giovanni Bajo <rasky at develer.com> 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
> --onedir, or bundled within the executable when using --onefile (and
> automatically extracted into the temporary dir at startup).
>
> Using this support, I've improved PyQt4's import hooks so that Qt
> plugins (such as imageformats, codecs, etc.) are automatically handled
> by PyInstaller. IOW, this is now fully transparent to PyInstaller users:
> just run PyInstaller trunk and enjoy your multi-platform bundles of PyQt
> applications without having to take care of plugins manually.


I just checked out trunk and gave PyInstaller a try on a windows machine.

The first problem was that it generated a spec with the distdir using
'\' instead of '\\' which causes problems.

Secondly though, I couldn't get my PyQt app to get past the imports:

--------------------------------
C:\Scripts\runner\build\pyi.win32\runner>runner.exe
Cannot open archive: C:\Scripts\runner\build\pyi.win32\runner\runner.pkg
Extracting binaries
python26.dll
Manipulating evironment
PYTHONPATH=C:/Scripts/runner/build/pyi.win32/runner
importing modules from CArchive
extracted iu
extracted struct
extracted archive
Installing import hooks
outPYZ1.pyz
Running scripts
Traceback (most recent call last):
  File "<string>", line 3, in <module>
ImportError: cannot import name QtCore
RC: -1 from runner
OK.
--------------------------------

-- 
Fedora 9 : sulphur is good for the skin
( www.pembo13.com )


More information about the PyQt mailing list