I have a small webview application:
from PyQt5.QtWidgets import QMainWindow, QApplication
from PyQt5.QtWebEngineWidgets import QWebEngineView
import sys
class MyWebViewer(QMainWindow):
def __init__(self, *args, **kwargs):
QMainWindow.__init__(self, *args, **kwargs)
webview = QWebEngineView(self)
self.setCentralWidget(webview)
webview.setHtml("<html><body><H1>test</h1></body></html>")
if __name__ == '__main__':
app = QApplication(sys.argv)
m = MyWebViewer()
m.show()
app.exec()
The problem is that when I build it with pyinstaller
pyinstaller --noconsole test_application.py
the size of the application becomes very large (164mb) and Qt5WebEngineCore.dll comprise 69mb alone.
I use a clean python installation with only the neccessary modules:
Python 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:54:40) [MSC v.1900 64 bit (AMD64)] on win32
altgraph (0.15)
future (0.16.0)
macholib (1.9)
pefile (2017.11.5)
pip (9.0.1)
PyInstaller (3.3.1)
pypiwin32 (223)
PyQt5 (5.10.1)
pywin32 (223)
setuptools (28.8.0)
sip (4.19.8)
The viewer is intended to show sphinx-generated html documentation. How can I reduce the size of the application.