Browse Source

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

Mitchell Stokes 9 năm trước cách đây
mục cha
commit
bf5bddcbaf
1 tập tin đã thay đổi với 3 bổ sung2 xóa
  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:
             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__')