-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdplayer_api.spec
More file actions
110 lines (103 loc) · 3.05 KB
/
Copy pathdplayer_api.spec
File metadata and controls
110 lines (103 loc) · 3.05 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
# -*- mode: python ; coding: utf-8 -*-
#
# PyInstaller spec for the dplayer-api FastAPI sidecar.
#
# Usage:
# pyinstaller dplayer_api.spec
#
# Or via the build script which handles platform naming:
# ./scripts/build_sidecar.sh
#
# Output binary is placed in desktop_shell/src-tauri/binaries/ with the
# Tauri sidecar naming convention: dplayer-api-{target-triple}[.exe]
import sys
from pathlib import Path
ROOT = Path(SPECPATH) # repo root (spec lives at repo root)
SRC = ROOT / "src"
# ---------------------------------------------------------------------------
# Hidden imports required by uvicorn + FastAPI at runtime
# ---------------------------------------------------------------------------
hidden = [
# uvicorn internals
"uvicorn.logging",
"uvicorn.loops",
"uvicorn.loops.asyncio",
"uvicorn.loops.uvloop",
"uvicorn.protocols",
"uvicorn.protocols.http",
"uvicorn.protocols.http.auto",
"uvicorn.protocols.http.h11_impl",
"uvicorn.protocols.http.httptools_impl",
"uvicorn.protocols.websockets",
"uvicorn.protocols.websockets.auto",
"uvicorn.protocols.websockets.websockets_impl",
"uvicorn.protocols.websockets.wsproto_impl",
"uvicorn.lifespan",
"uvicorn.lifespan.off",
"uvicorn.lifespan.on",
# fastapi / starlette
"fastapi",
"starlette",
"starlette.routing",
"starlette.middleware",
"starlette.middleware.cors",
"anyio",
"anyio.from_thread",
# discogs_player packages
"discogs_player",
"discogs_player_api",
"discogs_player.core",
"discogs_player.data",
"discogs_player.services",
"discogs_player.use_cases",
"discogs_player.integrations",
# platformdirs — lazy imports missed by PyInstaller
"platformdirs",
"platformdirs.windows",
"platformdirs.macos",
"platformdirs.unix",
# stdlib extras sometimes missed
"email.mime.text",
"email.mime.multipart",
]
# ---------------------------------------------------------------------------
# Data files: DB migration scripts and any bundled assets
# ---------------------------------------------------------------------------
datas = [
# Include Alembic / raw SQL migration files if any exist under data/
(str(SRC / "discogs_player" / "data"), "discogs_player/data"),
]
a = Analysis(
[str(SRC / "discogs_player" / "api_main.py")],
pathex=[str(SRC)],
binaries=[],
datas=datas,
hiddenimports=hidden,
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=["gi", "gtk", "tkinter", "PyQt5", "PyQt6", "wx"],
noarchive=False,
)
pyz = PYZ(a.pure)
exe = EXE(
pyz,
a.scripts,
a.binaries,
a.datas,
[],
# Name is set by build_sidecar.sh via --name flag; default here for direct runs.
name="dplayer-api",
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=True, # keep console for sidecar logging
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
)