Skip to content

Commit 48725a9

Browse files
Add safeguard to "build" directory creation, fixing #271 (#272)
Since the code to create the "build" directory was added only recently, I assume there is good reason for it to be present. Therefore, instead of removing the command, this commit adds a safeguard such that the directory is only created if it not already exists. This fixes #271.
1 parent 4dc7486 commit 48725a9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,8 @@ def build_extension(self, ext):
121121
f.close()
122122

123123
# create build directory
124-
os.mkdir('build')
124+
if not os.path.isdir('build'):
125+
os.mkdir('build')
125126

126127
setup(
127128
name=name,

0 commit comments

Comments
 (0)