deploy-ng: Remove previous build before making a new one

This commit is contained in:
Mitchell Stokes 2017-01-28 23:42:03 -08:00
parent efd25e98a5
commit bf5bddcbaf
1 changed files with 3 additions and 2 deletions

View File

@ -69,8 +69,9 @@ class build_p3d(distutils.core.Command):
for platform in platforms:
builddir = os.path.join(self.build_base, platform)
if not os.path.exists(builddir):
distutils.dir_util.mkpath(builddir)
if os.path.exists(builddir):
distutils.dir_util.remove_tree(builddir)
distutils.dir_util.mkpath(builddir)
if use_wheels:
whldir = os.path.join(self.build_base, '__whl_cache__')