Skip to content

Commit

Permalink
fix(windows): specify tables hidden import for desktop
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinBelthle committed May 23, 2024
1 parent 4d421c8 commit d506359
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion AntaresWebWin.spec
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
# -*- mode: python ; coding: utf-8 -*-
from pathlib import Path
from PyInstaller.utils.hooks import collect_submodules, collect_data_files

block_cipher = None

# We need to analyze all alembic files to be sure the migration phase works fine
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={},
Expand Down

0 comments on commit d506359

Please sign in to comment.