This does two things for cleanup builds made with SCons:

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.
This commit is contained in:
Mitchell Stokes 2012-03-28 19:56:11 +00:00
parent cb45d282fe
commit 9391e4c4a3

@ -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'),