diff --git a/AntaresWebWin.spec b/AntaresWebWin.spec index 91fc74acb8..e25e8a0ab9 100644 --- a/AntaresWebWin.spec +++ b/AntaresWebWin.spec @@ -1,5 +1,6 @@ # -*- mode: python ; coding: utf-8 -*- from pathlib import Path +from PyInstaller.utils.hooks import collect_submodules, collect_data_files block_cipher = None @@ -7,16 +8,21 @@ block_cipher = None migrations_dir = Path('alembic/versions') migration_files = [str(f) for f in migrations_dir.iterdir() if f.is_file() and f.suffix == '.py'] +# Specify hidden import +tables_module = collect_submodules('tables') +tables_files = collect_data_files('tables') + antares_web_server_a = Analysis(['antarest/gui.py', 'alembic/env.py'] + migration_files, pathex=[], binaries=[('./alembic.ini', './alembic.ini')], - datas=[('./resources', './resources'), ('./alembic', './alembic')], + datas=[('./resources', './resources'), ('./alembic', './alembic'), table_files], hiddenimports=[ 'cmath', 'antarest.dbmodel', 'plyer.platforms.win', 'plyer.platforms.win.notification', 'pythonjsonlogger.jsonlogger', + tables_module ], hookspath=['extra-hooks'], hooksconfig={},