96 lines
2.2 KiB
RPMSpec
96 lines
2.2 KiB
RPMSpec
|
|
# -*- mode: python ; coding: utf-8 -*-
|
||
|
|
|
||
|
|
from PyInstaller.utils.hooks import collect_all
|
||
|
|
|
||
|
|
datas = [
|
||
|
|
('config/config.ini', 'backend/config')
|
||
|
|
]
|
||
|
|
binaries = []
|
||
|
|
hiddenimports = [
|
||
|
|
'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',
|
||
|
|
'backend.api',
|
||
|
|
'backend.api.routes',
|
||
|
|
'backend.api.schemas',
|
||
|
|
'backend.api.ws',
|
||
|
|
'backend.config',
|
||
|
|
'backend.config.settings',
|
||
|
|
'backend.database',
|
||
|
|
'backend.database.engine',
|
||
|
|
'backend.database.schema',
|
||
|
|
'backend.device',
|
||
|
|
'backend.device.base',
|
||
|
|
'backend.device.mock_vehicle',
|
||
|
|
'backend.services',
|
||
|
|
'backend.services.broadcaster',
|
||
|
|
'backend.services.server_monitor',
|
||
|
|
'backend.services.simulation_manager',
|
||
|
|
'backend.utils',
|
||
|
|
'psycopg',
|
||
|
|
'psycopg_binary',
|
||
|
|
'sqlalchemy.ext.asyncio',
|
||
|
|
'sqlalchemy.dialects.postgresql',
|
||
|
|
'asyncpg', # Just in case, though we use psycopg
|
||
|
|
]
|
||
|
|
|
||
|
|
tmp_ret = collect_all('uvicorn')
|
||
|
|
datas += tmp_ret[0]; binaries += tmp_ret[1]; hiddenimports += tmp_ret[2]
|
||
|
|
|
||
|
|
tmp_ret = collect_all('psycopg')
|
||
|
|
datas += tmp_ret[0]; binaries += tmp_ret[1]; hiddenimports += tmp_ret[2]
|
||
|
|
|
||
|
|
block_cipher = None
|
||
|
|
|
||
|
|
a = Analysis(
|
||
|
|
['main.py'],
|
||
|
|
pathex=[],
|
||
|
|
binaries=binaries,
|
||
|
|
datas=datas,
|
||
|
|
hiddenimports=hiddenimports,
|
||
|
|
hookspath=[],
|
||
|
|
hooksconfig={},
|
||
|
|
runtime_hooks=[],
|
||
|
|
excludes=[],
|
||
|
|
win_no_prefer_redirects=False,
|
||
|
|
win_private_assemblies=False,
|
||
|
|
cipher=block_cipher,
|
||
|
|
noarchive=False,
|
||
|
|
)
|
||
|
|
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
|
||
|
|
|
||
|
|
exe = EXE(
|
||
|
|
pyz,
|
||
|
|
a.scripts,
|
||
|
|
[],
|
||
|
|
exclude_binaries=True,
|
||
|
|
name='smartedt_backend',
|
||
|
|
debug=False,
|
||
|
|
bootloader_ignore_signals=False,
|
||
|
|
strip=False,
|
||
|
|
upx=True,
|
||
|
|
console=True,
|
||
|
|
disable_windowed_traceback=False,
|
||
|
|
argv_emulation=False,
|
||
|
|
target_arch=None,
|
||
|
|
codesign_identity=None,
|
||
|
|
entitlements_file=None,
|
||
|
|
)
|
||
|
|
coll = COLLECT(
|
||
|
|
exe,
|
||
|
|
a.binaries,
|
||
|
|
a.zipfiles,
|
||
|
|
a.datas,
|
||
|
|
strip=False,
|
||
|
|
upx=True,
|
||
|
|
upx_exclude=[],
|
||
|
|
name='smartedt_backend',
|
||
|
|
)
|