# -*- mode: python ; coding: utf-8 -*- """ PyInstaller spec file для сборки GUI приложения Создает standalone exe-файл со всеми зависимостями """ import os block_cipher = None # Дополнительные данные для включения added_files = [ ('modules/*.py', 'modules'), ('.env.example', '.'), ('app_icon.png', '.'), ] # Скрытые импорты hiddenimports = [ 'PyQt6.QtCore', 'PyQt6.QtGui', 'PyQt6.QtWidgets', 'lxml.etree', 'lxml._elementpath', 'requests', 'cryptography', 'cryptography.fernet', ] a = Analysis( ['gui_app.py'], pathex=[], binaries=[], datas=added_files, hiddenimports=hiddenimports, hookspath=[], hooksconfig={}, runtime_hooks=[], excludes=[ 'telegram', 'telegram.ext', 'matplotlib', 'numpy', 'pandas', 'tkinter', ], 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, a.binaries, a.zipfiles, a.datas, [], name='MoySkladGenerator', debug=False, bootloader_ignore_signals=False, strip=False, upx=True, upx_exclude=[], runtime_tmpdir=None, console=False, # Без консоли disable_windowed_traceback=False, argv_emulation=False, target_arch=None, codesign_identity=None, entitlements_file=None, icon='app_icon.ico' if os.path.exists('app_icon.ico') else None, )