Repository navigation
Expand file tree
/
Copy pathpyinstaller.spec
More file actions
80 lines (70 loc) · 2.14 KB
/
Copy pathpyinstaller.spec
File metadata and controls
80 lines (70 loc) · 2.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# -*- mode: python -*-
# the shebang identifies this file as a 'python' 'type' for pre-commit hooks
import inspect
import os
import sys
# https://stackoverflow.com/questions/37319911/python-how-to-specify-output-folders-in-pyinstaller-spec-file?rq=1
use_upx = True
block_cipher = None
sys.modules["FixTk"] = None
a = Analysis(
[os.path.join("src", "entrypoint.py")],
pathex=["dist"],
binaries=[],
datas=[], # not sure why pyinstaller uses this spelling # spellchecker:disable-line
hiddenimports=[
"eventlet.hubs.epolls",
"eventlet.hubs.kqueue",
"eventlet.hubs.selects",
"dns",
"dns.asyncquery",
"dns.asyncresolver",
"dns.dnssec",
"dns.e164",
"dns.hash",
"dns.namedict",
"dns.tsigkeyring",
"dns.update",
"dns.version",
"dns.versioned",
"dns.zone",
"engineio.async_drivers.eventlet",
],
hookspath=[],
runtime_hooks=[],
excludes=["FixTk", "tcl", "tk", "_tkinter", "tkinter", "Tkinter"],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
)
print("Modules/packages found during analysis:") # allow-print
for this_info in sorted(a.pure, key=lambda x: x[0]):
print(this_info) # allow-print
pyz = PYZ( # type: ignore # noqa: F821 the 'PYZ' object is special to how pyinstaller reads the file
a.pure, a.zipped_data, cipher=block_cipher
)
exe = EXE( # type: ignore # noqa: F821 the 'EXE' object is special to how pyinstaller reads the file
pyz,
a.scripts,
exclude_binaries=True,
name="cloud-courier",
debug=False,
strip=False,
upx=use_upx,
console=True,
)
coll = COLLECT(
exe,
a.binaries,
a.zipfiles,
a.datas, # not sure why pyinstaller uses this spelling # spellchecker:disable-line
strip=False,
upx=use_upx,
upx_exclude=[
"vcruntime140.dll", # UPX breaks this dll https://github.com/pyinstaller/pyinstaller/pull/3821
"qwindows.dll", # UPX also has trouble with PyQt https://github.com/upx/upx/issues/107
],
name="cloud-courier",
)