2f855bf720
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>
85 lines
1.9 KiB
RPMSpec
85 lines
1.9 KiB
RPMSpec
# -*- mode: python ; coding: utf-8 -*-
|
|
# PyInstaller spec file for MacroPad Server (Windows)
|
|
|
|
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',
|
|
# Relay client (imported lazily in the GUI, so declare explicitly)
|
|
'relay_client',
|
|
'aiohttp',
|
|
],
|
|
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=False,
|
|
target_arch=None,
|
|
codesign_identity=None,
|
|
entitlements_file=None,
|
|
icon='Macro Pad.ico',
|
|
)
|