Clean up Qt plugins dir in windows build

This commit is contained in:
Kovid Goyal 2011-06-06 06:56:34 -06:00
parent 1f837ca129
commit 1620dee548
2 changed files with 6 additions and 1 deletions

View File

@ -197,6 +197,10 @@ class Win32Freeze(Command, WixMixIn):
if os.path.exists(tg): if os.path.exists(tg):
shutil.rmtree(tg) shutil.rmtree(tg)
shutil.copytree(imfd, tg) shutil.copytree(imfd, tg)
for dirpath, dirnames, filenames in os.walk(tdir):
for x in filenames:
if not x.endswith('.dll'):
os.remove(self.j(dirpath, x))
print print
print 'Adding third party dependencies' print 'Adding third party dependencies'

View File

@ -65,7 +65,8 @@ def test_sqlite():
def test_qt(): def test_qt():
from PyQt4.Qt import (QWebView, QDialog, QImageReader, QNetworkAccessManager) from PyQt4.Qt import (QWebView, QDialog, QImageReader, QNetworkAccessManager)
fmts = set(map(unicode, QImageReader.supportedImageFormats())) fmts = set(map(unicode, QImageReader.supportedImageFormats()))
if 'jpg' not in fmts or 'png' not in fmts: testf = set(['jpg', 'png', 'mng', 'svg', 'ico', 'gif'])
if testf.intersection(fmts) != testf:
raise RuntimeError( raise RuntimeError(
"Qt doesn't seem to be able to load its image plugins") "Qt doesn't seem to be able to load its image plugins")
QWebView, QDialog QWebView, QDialog