Repository navigation
Expand file tree
/
Copy pathScanScratch.spec
More file actions
112 lines (101 loc) · 2.68 KB
/
Copy pathScanScratch.spec
File metadata and controls
112 lines (101 loc) · 2.68 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# -*- mode: python ; coding: utf-8 -*-
# macOS build spec for ScanScratch
import os
from PyInstaller.utils.hooks import collect_submodules
from PyInstaller.utils.hooks import collect_all
from PyInstaller.utils.hooks import copy_metadata
datas = []
binaries = []
hiddenimports = ['sounddevice', 'soundfile', 'proglog']
# Collect ALL of scipy to avoid lazy loading issues
scipy_ret = collect_all('scipy')
datas += scipy_ret[0]
binaries += scipy_ret[1]
hiddenimports += scipy_ret[2]
# Also collect pysstv
pysstv_ret = collect_all('pysstv')
datas += pysstv_ret[0]
binaries += pysstv_ret[1]
hiddenimports += pysstv_ret[2]
# Collect our src package
src_ret = collect_all('src')
datas += src_ret[0]
binaries += src_ret[1]
hiddenimports += src_ret[2]
# Collect moviepy for video export
moviepy_ret = collect_all('moviepy')
datas += moviepy_ret[0]
binaries += moviepy_ret[1]
hiddenimports += moviepy_ret[2]
# imageio is used by moviepy
imageio_ret = collect_all('imageio')
datas += imageio_ret[0]
binaries += imageio_ret[1]
hiddenimports += imageio_ret[2]
# proglog is used by moviepy
proglog_ret = collect_all('proglog')
datas += proglog_ret[0]
binaries += proglog_ret[1]
hiddenimports += proglog_ret[2]
# Add icon if it exists
icon_file = 'assets/icon.icns' if os.path.exists('assets/icon.icns') else None
a = Analysis(
['main.py'],
pathex=[],
binaries=binaries,
datas=datas,
hiddenimports=hiddenimports,
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[
'IPython', 'matplotlib', 'pandas', 'torch', 'tensorflow',
'transformers', 'nltk', 'jedi', 'zmq', 'pygments',
'cv2', 'skimage', 'lxml',
'pyarrow', 'tkinter', '_tkinter'
],
noarchive=False,
optimize=0,
)
pyz = PYZ(a.pure)
exe = EXE(
pyz,
a.scripts,
[],
exclude_binaries=True,
name='ScanScratch',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
console=False,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
)
coll = COLLECT(
exe,
a.binaries,
a.datas,
strip=False,
upx=True,
upx_exclude=[],
name='ScanScratch',
)
app = BUNDLE(
coll,
name='ScanScratch.app',
icon=icon_file,
bundle_identifier='com.scanscratch.app',
info_plist={
'CFBundleName': 'ScanScratch',
'CFBundleDisplayName': 'ScanScratch',
'CFBundleVersion': '1.1.1',
'CFBundleShortVersionString': '1.1.1',
'LSMinimumSystemVersion': '11.0',
'NSHighResolutionCapable': True,
'NSMicrophoneUsageDescription': 'ScanScratch needs audio access for SSTV transmission playback.',
},
)