-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcrates.spec
More file actions
117 lines (108 loc) · 2.9 KB
/
Copy pathcrates.spec
File metadata and controls
117 lines (108 loc) · 2.9 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
# -*- mode: python ; coding: utf-8 -*-
"""PyInstaller spec for Crates — AI-Powered Sample Pack Factory."""
from PyInstaller.utils.hooks import collect_data_files, collect_submodules
block_cipher = None
# Collect data files that hooks might miss
torch_data = collect_data_files("torch")
torchaudio_data = collect_data_files("torchaudio")
audio_separator_data = collect_data_files("audio_separator")
librosa_data = collect_data_files("librosa")
# Collect submodules for packages with lazy/dynamic imports
audio_separator_imports = collect_submodules("audio_separator")
a = Analysis(
["main.py"],
pathex=["."],
binaries=[
# Bundle standalone yt-dlp binary (download into bin/ before building)
("bin/yt-dlp", "."),
],
datas=[
("crates/resources/style.qss", "crates/resources"),
("crates/presets/presets.json", "crates/presets"),
] + torch_data + torchaudio_data + audio_separator_data + librosa_data,
hiddenimports=[
# Audio separator / Demucs
*audio_separator_imports,
# MIDI
"mido",
"mido.backends",
"mido.backends.rtmidi",
"rtmidi",
"rtmidi._rtmidi",
# Audio I/O
"sounddevice",
"soundfile",
"_soundfile_data",
# Effects
"pedalboard",
# Metering
"pyloudnorm",
# ML
"torch",
"torchaudio",
"librosa",
"sklearn",
"sklearn.cluster",
"sklearn.ensemble",
"sklearn.preprocessing",
"joblib",
# Data validation
"pydantic",
"pydantic.deprecated",
],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[
"torchvision", # not used — saves ~150MB
"matplotlib",
"tkinter",
"test",
"unittest",
"Cython",
],
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="Crates",
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=False,
console=False, # windowed mode — no terminal
target_arch="arm64",
)
coll = COLLECT(
exe,
a.binaries,
a.datas,
strip=False,
upx=False,
upx_exclude=[],
name="Crates",
)
app = BUNDLE(
coll,
name="Crates.app",
icon=None, # TODO: add assets/icon.icns when an icon is created
bundle_identifier="com.muxician.crates",
info_plist={
"CFBundleName": "Crates",
"CFBundleDisplayName": "Crates",
"CFBundleVersion": "1.0.0",
"CFBundleShortVersionString": "1.0.0",
"NSHighResolutionCapable": True,
"NSMicrophoneUsageDescription": (
"Crates needs audio access for playback and monitoring."
),
"LSMinimumSystemVersion": "13.0",
},
)