Files
cDNA-image-processing/build_exe.py
T

27 lines
623 B
Python

"""
PyInstaller打包脚本
运行: python build_exe.py
输出: dist/cDNA_Analyzer.exe
"""
import PyInstaller.__main__
import os
BASE = os.path.dirname(os.path.abspath(__file__))
PyInstaller.__main__.run([
'web/launcher.py',
'--name=cDNA_Analyzer',
'--onefile',
'--windowed',
'--add-data', f'web/templates;templates',
'--add-data', f'web/static;static',
'--hidden-import', 'skimage',
'--hidden-import', 'scipy.ndimage',
'--hidden-import', 'matplotlib.backends.backend_agg',
'--collect-all', 'skimage',
'--noconfirm',
'--clean',
])
print('\n完成!exe 在 dist/ 目录')