This does two things for cleanup builds made with SCons:
authorMitchell Stokes <mogurijin@gmail.com>
Wed, 28 Mar 2012 19:56:11 +0000 (19:56 +0000)
committerMitchell Stokes <mogurijin@gmail.com>
Wed, 28 Mar 2012 19:56:11 +0000 (19:56 +0000)
  1) Removes unwanted folders from Python/lib instead of just emptying them out.
  2) Removes the test folder from Python/lib. This folder contains unit tests for Python (not the unittest module itself), and is about 10~12MB.

build_files/scons/tools/Blender.py

index 155b4e800bb11a879fc4763b328484265f67fbbf..8341d51318b2604f4ce355bd29d035bba9309d14 100644 (file)
@@ -509,13 +509,12 @@ def WinPyBundle(target=None, source=None, env=None):
             print str(func) + ' failed on ' + str(path)
     print "Trying to remove existing py bundle."
     shutil.rmtree(py_target, False, printexception)
-    exclude_re=[re.compile('.*/test/.*'),
-                re.compile('^config/.*'),
-                re.compile('^config-*/.*'),
-                re.compile('^distutils/.*'),
-                re.compile('^idlelib/.*'),
-                re.compile('^lib2to3/.*'),
-                re.compile('^tkinter/.*'),
+    exclude_re=[re.compile('.*/test'),
+                re.compile('^test'),
+                re.compile('^distutils'),
+                re.compile('^idlelib'),
+                re.compile('^lib2to3'),
+                re.compile('^tkinter'),
                 re.compile('^_tkinter_d.pyd'),
                 re.compile('^turtledemo'),
                 re.compile('^turtle.py'),