[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyQt] Problems using PyQt 4.7 and py2exe
From: Albert Cervera i Areny <albert () nan-tic ! com>
Date: 2010-03-11 23:17:20
Message-ID: 201003120017.20108.albert () nan-tic ! com
[Download RAW message or body]
A Dijous, 4 de febrer de 2010, Albert Cervera i Areny va escriure:
> If I create the installer for my application using py2exe and PyQt 4.7, the
> application starts but fails with the following exception with QtWebKit:
>
> ImportError: DLL load failed: Can not find find the specified module.
>
> The installer works like a charm with PyQt 4.7rc2, though.
>
> The list of "system" dlls detected by py2exe is different in both versions,
> and considers QtNetwork and QtSvg as system dlls with PyQt 4.7, while it
> does *not* using rc2.
>
> Any ideas?
Answering to myself:
The problem seems to be that py2exe thinks QtNetwork.pyd, QtXmlPatterns4.dll
and QtSvg4.dll from PyQt4.7 are system libraries. The following code has fixed
the problem for me:
# Override the function in py2exe to determine if a dll should be included
dllList =
('mfc90.dll','msvcp90.dll','qtnetwork.pyd','qtxmlpatterns4.dll','qtsvg4.dll')
origIsSystemDLL = py2exe.build_exe.isSystemDLL
def isSystemDLL(pathname):
if os.path.basename(pathname).lower() in dllList:
return 0
return origIsSystemDLL(pathname)
py2exe.build_exe.isSystemDLL = isSystemDLL
--
Albert Cervera i Areny
http://www.NaN-tic.com
Mòbil: +34 669 40 40 18
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic