Skip to content
This repository was archived by the owner on Jun 6, 2022. It is now read-only.

Commit 28505dc

Browse files
committed
Fixed pyinstaller ballooning in size by adding excludes
1 parent 968ab0c commit 28505dc

File tree

2 files changed

+62
-29
lines changed

2 files changed

+62
-29
lines changed

pyinstaller.spec

+62-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,30 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616

17-
# This spec file is used by pyinstaller on linux as a settings file
17+
"""This spec file is used by pyinstaller as a settings file
18+
19+
Analysis:
20+
[File.py]: The program's entry point
21+
binaries: Any compiled libraries (.so, .pyd, etc.)
22+
datas: Where to look for additional files
23+
hiddenimports: What libraries not in the entrypoint that should be included
24+
25+
exe: Should be run on Windows only
26+
app: Should be run on macOS only
27+
coll: Should be run on all OSes
28+
29+
30+
Required modules (i.e. can't add to excludes):
31+
'__future__', # urllib3
32+
'calendar',
33+
'cgi',
34+
'codecs',
35+
'datetime',
36+
'email', # urllib3
37+
'tarfile', # webbrowser
38+
'urllib3.poolmanager',
39+
'xml',
40+
"""
1841

1942
block_cipher = None
2043

@@ -32,7 +55,44 @@ a = Analysis(['merlink.py'],
3255
'PyQt5.sip'],
3356
hookspath=[],
3457
runtime_hooks=[],
35-
excludes=[],
58+
excludes=[
59+
'PyQt5.QtBluetooth',
60+
'PyQt5.QtDBus',
61+
'PyQt5.QtDesigner',
62+
'PyQt5.QtHelp',
63+
'PyQt5.QtLocation',
64+
'PyQt5.QtMultimedia',
65+
'PyQt5.QtMultimediaWidgets',
66+
'PyQt5.QtNetwork',
67+
'PyQt5.QtNetworkAuth',
68+
'PyQt5.QtNfc',
69+
'PyQt5.QtOpenGL',
70+
'PyQt5.QtPositioning',
71+
'PyQt5.QtPrintSupport',
72+
'PyQt5.QtQml',
73+
'PyQt5.QtQuick',
74+
'PyQt5.QtQuickWidgets',
75+
'PyQt5.QtSensors',
76+
'PyQt5.QtSerialPort',
77+
'PyQt5.QtSql',
78+
'PyQt5.QtSvg',
79+
'PyQt5.QtTest',
80+
'PyQt5.QtWebChannel',
81+
'PyQt5.QtWebEngine',
82+
'PyQt5.QtWebEngineCore',
83+
'PyQt5.QtWebEngineWidgets',
84+
'PyQt5.QtWebSockets',
85+
'PyQt5.QtX11Extras',
86+
'PyQt5.QtXml',
87+
'PyQt5.QtXmlPatterns',
88+
89+
'bz2',
90+
'difflib',
91+
'ftplib',
92+
'lib2to3',
93+
'multiprocessing',
94+
'pkg_resources',
95+
],
3696
win_no_prefer_redirects=False,
3797
win_private_assemblies=False,
3898
cipher=block_cipher)

zip.py

-27
This file was deleted.

0 commit comments

Comments
 (0)