Poetry 管理依赖,使用 PyYAML 从 yml 读取配置,自定义 logging 生成日志,使用 APScheduler 和 py7zr 定时压缩归档日志。
Use Poetry to manage dependencies, read configuration from a YAML file using PyYAML, customize logging to generate logs, and use APScheduler and py7zr to periodically compress and archive logs.
-F
单文件 Single-file executable,-D
单目录 Single-directory executable-n
exe 文件名 Specifies the name of the exe file--add-data
添加资源文件 Adds resource files
pyinstaller -D src/main/setup.py -n main --add-data "res;res"
--noconfirm
无需确认是否覆盖上次构建的文件 No need to confirm whether to overwrite the last built file
pyinstaller main.spec --noconfirm
# 安装依赖 Install dependencies
poetry install
# 启动 Start the application
poetry run main