Alas, PyInstaller's automatic support is still not 100% OK since the
PyQt official installer puts the plugins in a directory which I can't
find a way to detect. I'm going to put more efforts into this soon.
> Anyway, I''ve gone through the
> manual, and PyInstaller generates an executable, but when I run the
> executable, it crashes (traceback at end of the message). Apparently,
> PyInstaller doesn't like SQLObject[1]. My program has only these two
> dependencies outside of the Python standard lib. Am I doing something
> wrong? PyInstaller version is a SVN checkout from this morning.
Thanks for reporting this, it's another case-sensitiveness problem
("import Sybase" in sqlobject/converters.py line 21 confuses PyInstaller
so that it thinks it's referring to the "sqlobject/sybase" package).
I thought we had fixed all of them but we had not :)
The attached patch fixes this problem. I can't commit right now because
we're in the middle of migration of PyInstaller's website and SVN
server, so SVN is locked down for writing for the time being. I'll
commit it as soon as the migration is over.
Anyway, if you manually apply the patch, you should be able to get on
testing your program with PyInstaller.
Thanks again!
--
Giovanni Bajo
Develer S.r.l.
http://www.develer.com
On Fri, Mar 27, 2009 at 1:08 PM, Giovanni Bajo <ra...@develer.com> wrote:
>
> The attached patch fixes this problem.
wow, that was fast! Thank you! The executable that PyInstaller
generates works now with your patch, except that, apparently, it
doesn't pick up the needed JPEG plugin from Qt/PyQt. I also tried the
workaround from [1]. Is there another way to tell PyInstaller that it
should include those plugins and where it can find them?
Regards,
Benjamin
[1] http://pyinstaller.python-hosting.com/wiki/PyQtPluginsWorkaround?version=2
As I said, the problem is that PyInstaller is unable to ask PyQt where
Qt's plugins have been installed.
But you can hack it around: edit hooks/hookutils.py. You'll find this
function in there:
def qt4_plugins_dir():
return exec_statement("from PyQt4.QtCore import QLibraryInfo; print
QLibraryInfo.location(QLibraryInfo.PluginsPath)")
Replace its content with:
return "c:\\your\\path\\to\\Qt\\plugins"
And run Build.py again. PyInstaller should then do its magic automatically.
I hope to have time to fix this in the following days.
On Fri, Mar 27, 2009 at 3:44 PM, Giovanni Bajo <ra...@develer.com> wrote:
>
> As I said, the problem is that PyInstaller is unable to ask PyQt where
> Qt's plugins have been installed.
>
> But you can hack it around: edit hooks/hookutils.py. You'll find this
> function in there:
>
> def qt4_plugins_dir():
> return exec_statement("from PyQt4.QtCore import QLibraryInfo; print
> QLibraryInfo.location(QLibraryInfo.PluginsPath)")
>
>
> Replace its content with:
>
> return "c:\\your\\path\\to\\Qt\\plugins"
>
> And run Build.py again. PyInstaller should then do its magic automatically.
>
I did that, and the executable is indeed 4 MBytes larger than before
(but still more than 10 MByte smaller than a py2exe build of the same
application :) ). But the JPEG files are still not painted by Qt. I
don't get any error messages, just blank widgets where images should
be... anyway, I have enough other things to do before the application
is anywhere near a deployable state. Thanks for your help!
Regards,
Benjamin