Files
decky-loader/backend/pyinstaller.spec
K900 5697d98862 treewide: fix package structure
The static files need to be inside the module to be installed correctly
as part of the module.
2024-06-29 16:53:57 -04:00

31 lines
715 B
Python

import os
from PyInstaller.building.build_main import Analysis
from PyInstaller.building.api import EXE, PYZ
from PyInstaller.utils.hooks import copy_metadata
a = Analysis(
['main.py'],
datas=[
('decky_loader/locales', 'decky_loader/locales'),
('decky_loader/static', 'decky_loader/static'),
] + copy_metadata('decky_loader'),
hiddenimports=['logging.handlers', 'sqlite3', 'decky_plugin', 'decky'],
)
pyz = PYZ(a.pure, a.zipped_data)
noconsole = bool(os.getenv('DECKY_NOCONSOLE'))
name = "PluginLoader"
if noconsole:
name += "_noconsole"
exe = EXE(
pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
name=name,
upx=True,
console=not noconsole,
)