Skip to content

Commit 8df9297

Browse files
committed
Fixed build file
1 parent 74e46e2 commit 8df9297

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

devtools/build.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@
66

77
# Set the current working dir to parent directory
88
sys.path.append(Path.cwd().parent.as_posix())
9-
os.chdir("..")
10-
CATALOGS = ("build", "dist")
119

10+
CATALOGS = ("build", "dist")
1211
BUILD_CMD = "python -m setup sdist bdist_wheel".split()
1312

13+
1414
if __name__ == "__main__":
15-
[shutil.rmtree(i) for i in CATALOGS]
15+
subprocess.Popen(BUILD_CMD)
16+
[shutil.rmtree(i) for i in CATALOGS if Path(i).exists()]
1617
subprocess.run(BUILD_CMD)
18+

0 commit comments

Comments
 (0)