Skip to content

Commit a2365f7

Browse files
committed
清理无用的 manga_ocr 数据文件收集代码
1 parent a2c40b7 commit a2365f7

2 files changed

Lines changed: 2 additions & 12 deletions

File tree

packaging/manga-translator-cpu.spec

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@ try:
1414
except Exception:
1515
unidic_datas = []
1616

17-
try:
18-
manga_ocr_datas = collect_data_files('manga_ocr')
19-
except Exception:
20-
manga_ocr_datas = []
21-
2217
# 使用collect_all自动收集onnxruntime的所有内容
2318
try:
2419
onnx_datas, onnx_binaries, onnx_hiddenimports = collect_all('onnxruntime')
@@ -39,7 +34,7 @@ a = Analysis(
3934
['../desktop_qt_ui/main.py'], # 相对于packaging目录
4035
pathex=[],
4136
binaries=onnx_binaries,
42-
datas=py3langid_datas + unidic_datas + manga_ocr_datas + onnx_datas, # 添加所有数据文件
37+
datas=py3langid_datas + unidic_datas + onnx_datas, # 添加所有数据文件
4338
hiddenimports=['pydensecrf.eigen', 'bsdiff4.core', 'PyQt6.QtCore', 'PyQt6.QtGui', 'PyQt6.QtWidgets', 'matplotlib', 'matplotlib.pyplot'] + onnx_hiddenimports, # 添加隐式导入
4439
hookspath=[],
4540
hooksconfig={},

packaging/manga-translator-gpu.spec

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@ try:
1414
except Exception:
1515
unidic_datas = []
1616

17-
try:
18-
manga_ocr_datas = collect_data_files('manga_ocr')
19-
except Exception:
20-
manga_ocr_datas = []
21-
2217
# 使用collect_all自动收集onnxruntime的所有内容
2318
try:
2419
onnx_datas, onnx_binaries, onnx_hiddenimports = collect_all('onnxruntime')
@@ -39,7 +34,7 @@ a = Analysis(
3934
['../desktop_qt_ui/main.py'], # 相对于packaging目录
4035
pathex=[],
4136
binaries=onnx_binaries,
42-
datas=py3langid_datas + unidic_datas + manga_ocr_datas + onnx_datas, # 添加所有数据文件
37+
datas=py3langid_datas + unidic_datas + onnx_datas, # 添加所有数据文件
4338
hiddenimports=['pydensecrf.eigen', 'bsdiff4.core', 'PyQt6.QtCore', 'PyQt6.QtGui', 'PyQt6.QtWidgets', 'matplotlib', 'matplotlib.pyplot'] + onnx_hiddenimports, # 添加隐式导入
4439
hookspath=[],
4540
hooksconfig={},

0 commit comments

Comments
 (0)