Files
MP-Server/macropad_macos.spec
T
shadowdao 2f855bf720 fix: drop netifaces (unbuildable on runner), harden build install
The packaged exe crashed with ModuleNotFoundError: No module named 'PySide6'.
Root cause: `pip install -e .` aborted because netifaces has no wheel for the
build's Python and needs MSVC to compile from source, so NO dependencies were
installed — and the workflow didn't catch it (native-command failures don't
trip $ErrorActionPreference, and the next pip command succeeded).

- Replace netifaces with a dependency-free socket-based LAN IP detection in the
  GUI; remove netifaces from pyproject and all PyInstaller specs.
- Make pip failures fatal (check $LASTEXITCODE) and add a "Verify runtime
  imports" step that fails the build before bundling if any dep is missing.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-17 22:40:34 -07:00

93 lines
2.0 KiB
RPMSpec

# -*- mode: python ; coding: utf-8 -*-
# PyInstaller spec file for MacroPad Server (macOS)
import os
a = Analysis(
['main.py'],
pathex=[],
binaries=[],
datas=[
('web', 'web'),
('Macro Pad.png', '.'),
],
hiddenimports=[
# PySide6
'PySide6.QtCore',
'PySide6.QtGui',
'PySide6.QtWidgets',
# FastAPI and web server
'fastapi',
'uvicorn',
'uvicorn.logging',
'uvicorn.loops',
'uvicorn.loops.auto',
'uvicorn.protocols',
'uvicorn.protocols.http',
'uvicorn.protocols.http.auto',
'uvicorn.protocols.websockets',
'uvicorn.protocols.websockets.auto',
'uvicorn.lifespan',
'uvicorn.lifespan.on',
'starlette',
'starlette.routing',
'starlette.responses',
'starlette.staticfiles',
'starlette.websockets',
'anyio',
'anyio._backends._asyncio',
# Pydantic
'pydantic',
'pydantic.fields',
# Other dependencies
'qrcode',
'PIL',
'pyautogui',
'pyperclip',
'pystray',
'websockets',
'multipart',
],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
noarchive=False,
optimize=0,
)
pyz = PYZ(a.pure)
exe = EXE(
pyz,
a.scripts,
a.binaries,
a.datas,
[],
name='macropad',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=False,
disable_windowed_traceback=False,
argv_emulation=True,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
)
app = BUNDLE(
exe,
name='MacroPad Server.app',
icon='Macro Pad.png',
bundle_identifier='com.macropad.server',
info_plist={
'CFBundleShortVersionString': '0.9.2',
'CFBundleName': 'MacroPad Server',
'NSHighResolutionCapable': True,
},
)