Files
booru-viewer/booru-viewer.spec
T
pax d7c085d3af feat: linux appimage packaging and workflow
Adds a pinned, assertions-gated build; notices cover the Linux payload.
2026-11-22 20:59:44 -06:00

69 lines
1.4 KiB
RPMSpec

# -*- mode: python ; coding: utf-8 -*-
import sys
from PyInstaller.utils.hooks import collect_submodules, copy_metadata
block_cipher = None
hiddenimports = [
*collect_submodules('booru_viewer'),
'httpx',
'httpx._transports',
'httpx._transports.default',
'h2',
'hpack',
'hyperframe',
'PIL',
'PIL.Image',
'PIL.JpegImagePlugin',
'PIL.PngImagePlugin',
'PIL.GifImagePlugin',
'PIL.WebPImagePlugin',
'PIL.BmpImagePlugin',
'mpv',
]
a = Analysis(
['booru_viewer/main_gui.py'],
pathex=[],
binaries=[('libmpv-2.dll', '.')] if sys.platform == 'win32' else [],
datas=[('icon.png', '.')] + (copy_metadata('booru-viewer') if sys.platform == 'linux' else []),
hiddenimports=hiddenimports,
hookspath=[],
hooksconfig={},
runtime_hooks=['packaging/rthook_mpv.py'] if sys.platform == 'linux' else [],
excludes=['textual', 'tkinter', 'unittest'],
noarchive=True,
optimize=2,
cipher=block_cipher,
)
pyz = PYZ(a.pure, cipher=block_cipher)
exe = EXE(
pyz,
a.scripts,
[],
exclude_binaries=True,
name='booru-viewer',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=False,
upx_exclude=[],
console=False,
disable_windowed_traceback=False,
argv_emulation=False,
icon='icon.ico',
)
coll = COLLECT(
exe,
a.binaries,
a.datas,
strip=False,
upx=False,
upx_exclude=[],
name='booru-viewer',
)