From f4e07902023179e0bc24b3fcac37c32663e8fa4e Mon Sep 17 00:00:00 2001 From: belthlemar Date: Thu, 23 May 2024 13:43:06 +0200 Subject: [PATCH] test with binaries and v4.10 --- AntaresWebLinux.spec | 5 ++++- AntaresWebWin.spec | 6 ++---- requirements-dev.txt | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/AntaresWebLinux.spec b/AntaresWebLinux.spec index 9ef9c954ff..c11ec84a2b 100644 --- a/AntaresWebLinux.spec +++ b/AntaresWebLinux.spec @@ -1,5 +1,6 @@ # -*- mode: python ; coding: utf-8 -*- from pathlib import Path +from PyInstaller.utils.hooks import collect_dynamic_libs block_cipher = None @@ -7,9 +8,11 @@ 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'] +binaries = [('./alembic.ini', './alembic.ini')] + collect_dynamic_libs('tables') + antares_web_server_a = Analysis(['antarest/gui.py', 'alembic/env.py'] + migration_files, pathex=[], - binaries=[('./alembic.ini', './alembic.ini')], + binaries=binaries, datas=[('./resources', './resources'), ('./alembic', './alembic')], hiddenimports=[ 'cmath', diff --git a/AntaresWebWin.spec b/AntaresWebWin.spec index 9502eaa374..bb26eda739 100644 --- a/AntaresWebWin.spec +++ b/AntaresWebWin.spec @@ -10,12 +10,10 @@ migration_files = [str(f) for f in migrations_dir.iterdir() if f.is_file() and f # Specify hidden import tables_files = collect_data_files('tables') -xlsx_files = collect_data_files('xlsxwriter') -datas = [('./resources', './resources'), ('./alembic', './alembic')] + tables_files + xlsx_files +datas = [('./resources', './resources'), ('./alembic', './alembic')] + tables_files tables_module = collect_submodules('tables') -xlsx_module = collect_submodules('xlsxwriter') -hidden_imports = ['cmath', 'antarest.dbmodel', 'plyer.platforms.win', 'plyer.platforms.win.notification', 'pythonjsonlogger.jsonlogger'] + tables_module + xlsx_module +hidden_imports = ['cmath', 'antarest.dbmodel', 'plyer.platforms.win', 'plyer.platforms.win.notification', 'pythonjsonlogger.jsonlogger'] + tables_module antares_web_server_a = Analysis(['antarest/gui.py', 'alembic/env.py'] + migration_files, pathex=[], diff --git a/requirements-dev.txt b/requirements-dev.txt index 99174b7fdb..926426f4c0 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -3,8 +3,8 @@ black~=23.7.0 isort~=5.12.0 mypy~=1.4.1 -pyinstaller==5.0.1 -pyinstaller-hooks-contrib==2024.6 +pyinstaller==4.10 +pyinstaller-hooks-contrib==2024.4 # Extra requirements installed by `mypy --install-types`. # IMPORTANT: Make sure the versions of these typing libraries match the versions