-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
140 lines (120 loc) · 3.25 KB
/
Copy pathsetup.py
File metadata and controls
140 lines (120 loc) · 3.25 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
"""
py2app setup script for abispeak menu bar application.
Build commands:
Development (alias mode - links to source):
python setup.py py2app -A
Production (standalone bundle):
python setup.py py2app
The built application will be in dist/abispeak.app
"""
from setuptools import setup
import os
# Read version from VERSION file
version = "1.7.0"
version_file = os.path.join(os.path.dirname(__file__), 'VERSION')
if os.path.exists(version_file):
with open(version_file, 'r') as f:
version = f.read().strip()
APP = ['menu_bar_app.py']
# Data files to include in the bundle
DATA_FILES = [
# Sound files
'on.wav',
'off.wav',
'on.mp3',
'off.mp3',
# Version file
'VERSION',
]
# py2app options
OPTIONS = {
'argv_emulation': False,
'iconfile': 'assets/icon.icns',
# Info.plist configuration
'plist': {
# App identity
'CFBundleName': 'abispeak',
'CFBundleDisplayName': 'abispeak',
'CFBundleIdentifier': 'com.abispeak.app',
'CFBundleVersion': version,
'CFBundleShortVersionString': version,
# Show in Dock and menu bar
'LSUIElement': False,
# Minimum macOS version
'LSMinimumSystemVersion': '12.3',
# Privacy permissions
'NSMicrophoneUsageDescription':
'abispeak needs microphone access to record your voice for speech-to-text transcription.',
'NSAppleEventsUsageDescription':
'abispeak needs accessibility permissions to detect the Fn key for activating recording.',
# App category
'LSApplicationCategoryType': 'public.app-category.productivity',
# Copyright
'NSHumanReadableCopyright': 'Copyright © 2026 Abi Abiassi',
# High resolution capable
'NSHighResolutionCapable': True,
# Supports automatic graphics switching
'NSSupportsAutomaticGraphicsSwitching': True,
},
# Packages to include
'packages': [
'models',
'utils',
'torch',
'torchaudio',
'numpy',
'sounddevice',
'soundfile',
'pynput',
'pyperclip',
'pykeybindmanager',
'rich',
'AppKit',
'Foundation',
'objc',
'PyObjCTools',
'Quartz',
'huggingface_hub',
'tqdm',
],
# Modules to include
'includes': [
'state',
'hotkeys',
'transcription',
'streaming',
'cli',
'model_loader',
'logging_config',
'environment',
'permissions',
],
# Exclude unnecessary packages to reduce bundle size
'excludes': [
'textual', # Not needed for menu bar app
'tkinter',
'matplotlib',
'PIL',
'scipy',
'pandas',
'IPython',
'jupyter',
'notebook',
],
# Extra scripts (overlay window runs as subprocess)
'resources': [
'utils/overlay_window.py',
],
}
setup(
name='abispeak',
version=version,
description='A macOS menu bar speech-to-text utility',
author='Abi Abiassi',
url='https://github.com/abiassi/abispeak',
app=APP,
data_files=DATA_FILES,
options={'py2app': OPTIONS},
setup_requires=['py2app'],
python_requires='>=3.10',
)