-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcassette.spec
More file actions
141 lines (122 loc) · 3.07 KB
/
Copy pathcassette.spec
File metadata and controls
141 lines (122 loc) · 3.07 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
# -*- mode: python ; coding: utf-8 -*-
import sys
import os
block_cipher = None
is_darwin = sys.platform == 'darwin'
if sys.platform == 'win32':
icon_file = 'System/Assets/Icons/Cassette/AppIcon.ico'
elif is_darwin:
icon_file = 'System/Assets/Icons/Cassette/AppIcon.icns'
else:
icon_file = 'System/Assets/Icons/Cassette/AppIcon/Icon256.png'
a = Analysis(
['Cassette.py'],
pathex=[],
binaries=[],
datas=[
('version', '.'),
('System', 'System'),
],
hiddenimports=[
'OpenGL',
'OpenGL.platform.egl',
],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[
'PyQt6.QtSql',
'PyQt6.QtQml',
'PyQt6.QtQuick',
'PyQt6.QtMultimedia',
'PyQt6.QtTest',
'PyQt6.QtPdf',
'tkinter',
'sqlite3',
'distutils',
'numpy.tests',
'PyQt6.QtWebEngine',
'PyQt6.QtWebEngineCore',
'PyQt6.QtWebEngineWidgets',
'PyQt6.QtBluetooth',
'PyQt6.QtDBus',
'PyQt6.QtNfc',
'PyQt6.QtPositioning',
'PyQt6.QtSensors',
'PyQt6.QtSvg',
'PyQt6.QtXml',
'PyQt6.QtWebSockets',
'PyQt6.QtPrintSupport',
'PyQt6.QtTextToSpeech',
'PyQt6.QtNetworkAuth',
'matplotlib',
'scipy',
'pandas',
'IPython',
'jupyter',
'notebook',
'PIL',
'unittest',
'pydoc',
'curses',
'lib2to3',
'xmlrpc',
'http.server',
],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False,
)
binaries_clean = []
seen_basenames = set()
for name, path, typecode in a.binaries:
if "PyQt6" in name or "numpy" in name:
binaries_clean.append((name, path, typecode))
seen_basenames.add(os.path.basename(name))
for name, path, typecode in a.binaries:
basename = os.path.basename(name)
if basename not in seen_basenames:
binaries_clean.append((name, path, typecode))
seen_basenames.add(basename)
a.binaries = binaries_clean
if sys.platform == "linux":
ignore = ('libstdc++.so.6',)
a.binaries = [b for b in a.binaries if not any(n in os.path.basename(b[0]) for n in ignore)]
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
exe = EXE(
pyz,
a.scripts,
a.binaries if is_darwin else [],
a.zipfiles if is_darwin else [],
a.datas if is_darwin else [],
exclude_binaries=not is_darwin,
name='Cassette',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=False,
console=False,
icon=icon_file
)
if not is_darwin:
coll = COLLECT(
exe,
a.binaries,
a.zipfiles,
a.datas,
strip=False,
upx=True,
name='Cassette',
)
if is_darwin:
app = BUNDLE(
exe,
name='Cassette.app',
icon=icon_file,
bundle_identifier='com.cassette.app',
info_plist={
'CFBundleShortVersionString': '1.0.0',
'NSHighResolutionCapable': 'True',
},
)