Browse Source

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

Mitchell Stokes 9 years ago
parent
commit
bf5bddcbaf
1 changed files with 3 additions and 2 deletions
  1. 3 2
      direct/src/showutil/dist.py

+ 3 - 2
direct/src/showutil/dist.py

@@ -69,8 +69,9 @@ class build_p3d(distutils.core.Command):
         for platform in platforms:
         for platform in platforms:
             builddir = os.path.join(self.build_base, platform)
             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:
             if use_wheels:
                 whldir = os.path.join(self.build_base, '__whl_cache__')
                 whldir = os.path.join(self.build_base, '__whl_cache__')