-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.py
39 lines (33 loc) · 831 Bytes
/
build.py
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
29
30
31
32
33
34
35
36
37
38
39
import shutil
import os
import PyInstaller.__main__ as pm
def cleanup(dist):
shutil.rmtree("build", True)
if dist:
shutil.rmtree("dist", True)
try:
os.remove("MarkdownViewer.spec")
except FileNotFoundError:
pass
shutil.rmtree("__pycache__", True)
cleanup(True)
pm.run(
[
"--windowed",
"--clean",
"mdviewer.py",
"--exclude-module=_ssl",
"--exclude-module=pyreadline",
"--exclude-module=difflib",
"--exclude-module=tcl",
"--exclude-module=optparse",
"--exclude-module=pickle",
"--exclude-module=pdb",
"--exclude-module=unittest",
"--exclude-module=test",
"--exclude-module=doctest",
"--exclude-module=tkinter",
"--name=MarkdownViewer",
]
)
cleanup(False)