-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsetup_app.py
More file actions
80 lines (75 loc) · 1.99 KB
/
setup_app.py
File metadata and controls
80 lines (75 loc) · 1.99 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
"""py2app build configuration for Dictate.app
Build a standalone macOS .app bundle:
python setup_app.py py2app # production build
python setup_app.py py2app -A # development build (symlinked)
Output: dist/Dictate.app
"""
from setuptools import setup
APP = ["dictate/menubar_main.py"]
DATA_FILES = []
OPTIONS = {
"argv_emulation": False, # Must be False for menu bar apps
"iconfile": "assets/dictate.icns",
"plist": {
"CFBundleName": "Dictate",
"CFBundleDisplayName": "Dictate",
"CFBundleIdentifier": "com.0xbrando.dictate",
"CFBundleVersion": "2.4.1",
"CFBundleShortVersionString": "2.4.1",
"LSUIElement": True, # Menu bar only — no Dock icon
"LSMinimumSystemVersion": "14.0", # macOS Sonoma+ for MLX
"NSMicrophoneUsageDescription": (
"Dictate needs microphone access for voice-to-text transcription. "
"All processing happens locally on your device."
),
"NSAppleEventsUsageDescription": (
"Dictate uses accessibility to type transcribed text "
"into your active application."
),
},
"packages": [
"dictate",
"mlx",
"mlx.core",
"mlx.nn",
"mlx_whisper",
"mlx_lm",
"numpy",
"sounddevice",
"pynput",
"pyperclip",
"huggingface_hub",
"safetensors",
"tokenizers",
"transformers",
"rumps",
"dotenv",
],
"includes": [
"objc",
"AppKit",
"Foundation",
],
"excludes": [
"tkinter",
"test",
"unittest",
"matplotlib",
"scipy",
"PIL",
"IPython",
"jupyter",
"notebook",
"pytest",
],
"semi_standalone": False,
"site_packages": True,
"arch": "arm64", # Apple Silicon only
}
setup(
app=APP,
name="Dictate",
data_files=DATA_FILES,
options={"py2app": OPTIONS},
setup_requires=["py2app"],
)