forked from RTGS2017/NagaAgent
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclear.py
More file actions
28 lines (23 loc) · 793 Bytes
/
Copy pathclear.py
File metadata and controls
28 lines (23 loc) · 793 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#清理打包产生的文件和文件夹
import os
import shutil
def clear_build_artifacts():
# 删除解压的Python文件夹
python_folder = "py3119"
if os.path.exists(python_folder):
shutil.rmtree(python_folder)
# 删除使用说明文件
usage_file = "使用必看说明.txt"
if os.path.exists(usage_file):
os.remove(usage_file)
# 删除启动脚本
startup_script = "启动.cmd"
if os.path.exists(startup_script):
os.remove(startup_script)
# 删除占位文件
placeholder_file = ".is_package"
if os.path.exists(placeholder_file):
os.remove(placeholder_file)
print("清理完成,已删除打包产生的文件和文件夹。")
if __name__ == "__main__":
clear_build_artifacts()