TableSynthesis/seat_allocation.spec
2025-06-30 21:22:02 +08:00

128 lines
2.9 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# -*- mode: python ; coding: utf-8 -*-
# 完全独立的PyInstaller配置
# 包含Python解释器和所有依赖无需目标机器安装Python
import sys
from pathlib import Path
block_cipher = None
a = Analysis(
['seat_allocation_system.py'],
pathex=[str(Path.cwd())],
binaries=[],
datas=[
# 包含必要的数据文件(如果有的话)
],
hiddenimports=[
# 核心依赖
'pandas',
'openpyxl',
'numpy',
'xlsxwriter',
'xlrd',
'datetime',
'pathlib',
'subprocess',
'platform',
'sys',
'os',
# openpyxl相关
'openpyxl.workbook',
'openpyxl.worksheet',
'openpyxl.styles',
'openpyxl.utils',
'openpyxl.writer.excel',
'openpyxl.reader.excel',
'openpyxl.cell',
'openpyxl.formatting',
'openpyxl.formatting.rule',
# pandas相关
'pandas.io.excel',
'pandas.io.common',
'pandas.io.parsers',
'pandas.io.formats',
'pandas.io.formats.excel',
'pandas._libs.tslibs.timedeltas',
'pandas._libs.tslibs.np_datetime',
'pandas._libs.tslibs.nattype',
'pandas._libs.skiplist',
# numpy相关
'numpy.core.multiarray',
'numpy.core.umath',
'numpy.core._methods',
'numpy.lib.format',
'numpy.random._pickle',
# 编码相关
'encodings',
'encodings.utf_8',
'encodings.gbk',
'encodings.cp1252',
# 其他必要模块
'pkg_resources.py2_warn',
'_ctypes',
'ctypes.util'
],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[
# 排除不必要的大型库
'matplotlib',
'scipy',
'IPython',
'jupyter',
'notebook',
'tkinter',
'PyQt5',
'PyQt6',
'PySide2',
'PySide6',
'test',
'tests',
'unittest',
'doctest',
'pdb',
'pydoc',
'setuptools',
'pip',
'wheel',
'distutils'
],
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='座位分配系统',
debug=False,
bootloader_ignore_signals=False,
strip=False, # 保留符号信息以便调试
upx=False, # 不使用UPX压缩以提高兼容性
upx_exclude=[],
runtime_tmpdir=None,
console=True,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
# 确保包含Python运行时
exclude_binaries=False,
)