64 lines
1.4 KiB
RPMSpec
64 lines
1.4 KiB
RPMSpec
# -*- mode: python ; coding: utf-8 -*-
|
|
# PyInstaller 打包配置:python -m PyInstaller remo_disp_server.spec
|
|
# 打包后运行 dist\remo_disp_server\remo_disp_server.exe [装置IP]
|
|
|
|
block_cipher = None
|
|
|
|
# 需要随 exe 一起打包的数据文件(HTML、静态资源)
|
|
added_files = [
|
|
('remo_disp_ui.html', '.'),
|
|
]
|
|
# 若存在 static 目录则打包(favicon 等)
|
|
import os as _os
|
|
if _os.path.isdir('static'):
|
|
added_files.append(('static', 'static'))
|
|
|
|
a = Analysis(
|
|
['remo_disp_server.py'],
|
|
pathex=[],
|
|
binaries=[],
|
|
datas=added_files,
|
|
hiddenimports=[
|
|
'engineio.async_drivers.threading',
|
|
'flask_socketio',
|
|
'python_engineio',
|
|
'python_socketio',
|
|
'werkzeug',
|
|
'PIL',
|
|
'PIL._tkinter_finder',
|
|
'loguru',
|
|
],
|
|
hookspath=[],
|
|
hooksconfig={},
|
|
runtime_hooks=[],
|
|
excludes=[],
|
|
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='remo_disp_server',
|
|
debug=False,
|
|
bootloader_ignore_signals=False,
|
|
strip=False,
|
|
upx=True,
|
|
upx_exclude=[],
|
|
runtime_tmpdir=None,
|
|
console=True,
|
|
disable_windowed_traceback=False,
|
|
argv_emulation=False,
|
|
target_arch=None,
|
|
codesign_identity=None,
|
|
entitlements_file=None,
|
|
)
|