From 0b823beeaf3098dde9b2be36b585069e3bbd01cb Mon Sep 17 00:00:00 2001 From: allebonvi Date: Tue, 21 Apr 2026 16:05:51 +0200 Subject: [PATCH] Add PyInstaller spec --- MailExporter.spec | 87 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 MailExporter.spec diff --git a/MailExporter.spec b/MailExporter.spec new file mode 100644 index 0000000..70d2754 --- /dev/null +++ b/MailExporter.spec @@ -0,0 +1,87 @@ +# -*- mode: python ; coding: utf-8 -*- + +from pathlib import Path + +import customtkinter + + +project_dir = Path(SPECPATH) +customtkinter_dir = Path(customtkinter.__file__).resolve().parent + + +a = Analysis( + [str(project_dir / "mail_exporter.py")], + pathex=[str(project_dir)], + binaries=[], + datas=[(str(customtkinter_dir), "customtkinter")], + hiddenimports=[ + "pythoncom", + "pywintypes", + "win32com", + "win32com.client", + ], + hookspath=[], + hooksconfig={}, + runtime_hooks=[], + excludes=[ + "IPython", + "PIL", + "PyQt5", + "PyQt6", + "PySide2", + "PySide6", + "asyncio", + "curses", + "doctest", + "email.mime.audio", + "email.mime.image", + "email.mime.message", + "email.mime.multipart", + "email.mime.nonmultipart", + "email.mime.text", + "html", + "http", + "lib2to3", + "matplotlib", + "multiprocessing", + "numpy", + "pandas", + "pdb", + "pytest", + "setuptools", + "unittest", + "xmlrpc", + ], + noarchive=False, + optimize=1, +) + +pyz = PYZ(a.pure) + +exe = EXE( + pyz, + a.scripts, + [], + exclude_binaries=True, + name="MailExporter", + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + console=False, + disable_windowed_traceback=False, + argv_emulation=False, + target_arch=None, + codesign_identity=None, + entitlements_file=None, +) + +coll = COLLECT( + exe, + a.binaries, + a.datas, + strip=False, + upx=True, + upx_exclude=[], + name="MailExporter", +)