build.bat参数解析兼容PowerShell+gitignore修正保留构建脚本

This commit is contained in:
youpaishidifu
2026-08-03 11:03:57 +08:00
parent fa67eb407e
commit 686aae7e53
8 changed files with 577 additions and 1 deletions
+20
View File
@@ -0,0 +1,20 @@
"""PyInstaller hook: 避免 easyocr 默认 hook 触发 collect_submodules('torch') 崩溃。
PyInstaller 默认 hook-easyocr.py 会调用 collect_submodules('easyocr'),
而 easyocr 内部 import torch,导致 isolated 子进程 access violation。
本 hook 只列出 easyocr 实际需要的子模块,避开 torch 引用。
"""
hiddenimports = [
'easyocr',
'easyocr.easyocr',
'easyocr.config',
'easyocr.detection',
'easyocr.recognition',
'easyocr.utils',
'easyocr.craft',
'easyocr.craft_utils',
'easyocr.imgproc',
'easyocr.dataset',
'easyocr.model',
'easyocr.model.vgg_model',
]