-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathqcs.spec
More file actions
97 lines (89 loc) · 2.42 KB
/
Copy pathqcs.spec
File metadata and controls
97 lines (89 loc) · 2.42 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
# -*- mode: python ; coding: utf-8 -*-
#
# PyInstaller spec for Quantum Circuit Simulator — macOS .app bundle
#
# Build with:
# pyinstaller qcs.spec
#
# Produces:
# dist/Quantum Circuit Simulator.app (universal2: arm64 + x86_64)
import os
from PyInstaller.utils.hooks import collect_submodules, collect_data_files
block_cipher = None
# Collect all matplotlib backends so the runtime hook can switch to QtAgg
matplotlib_backends = collect_submodules('matplotlib.backends')
a = Analysis(
['qcs.py'],
pathex=[os.path.abspath('.')],
binaries=[],
datas=[
# Ship sample circuits alongside the app
('sample_data', 'sample_data'),
],
hiddenimports=[
'matplotlib.backends.backend_qtagg',
'PyQt6.sip',
# PyQt6 modules that may not be auto-detected
'PyQt6.QtCore',
'PyQt6.QtGui',
'PyQt6.QtWidgets',
'PyQt6.QtPrintSupport',
# numpy internals
'numpy.core._multiarray_umath',
] + matplotlib_backends,
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[
# GUI toolkits we are NOT using
'tkinter',
'wx',
'gi',
],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False,
)
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
exe = EXE(
pyz,
a.scripts,
[],
exclude_binaries=True,
name='Quantum Circuit Simulator',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
console=False, # no terminal window — proper macOS .app behaviour
disable_windowed_traceback=False,
target_arch='universal2', # fat binary: Apple Silicon + Intel
codesign_identity=None,
entitlements_file=None,
)
coll = COLLECT(
exe,
a.binaries,
a.zipfiles,
a.datas,
strip=False,
upx=True,
upx_exclude=[],
name='Quantum Circuit Simulator',
)
app = BUNDLE(
coll,
name='Quantum Circuit Simulator.app',
icon=None, # replace with 'resources/icon.icns' if available
bundle_identifier='com.qcs.simulator',
info_plist={
'CFBundleDisplayName': 'Quantum Circuit Simulator',
'CFBundleShortVersionString': '1.0.0',
'CFBundleVersion': '1.0.0',
'NSHighResolutionCapable': True,
'NSPrincipalClass': 'NSApplication',
'NSAppleScriptEnabled': False,
'LSMinimumSystemVersion': '11.0',
},
)