aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorg2p <none@none>2012-10-22 05:44:04 -0400
committerg2p <none@none>2012-10-22 05:44:04 -0400
commit18b97c5ff39229106f1561aaa2b59586d174a305 (patch)
treeac5a9afc16178c07293a91c1bb08834a1432c767
parent8e41afb1088ada9acb96ae295b0559a5353fdeba (diff)
downloadexternal_python_setuptools-18b97c5ff39229106f1561aaa2b59586d174a305.tar.gz
external_python_setuptools-18b97c5ff39229106f1561aaa2b59586d174a305.tar.bz2
external_python_setuptools-18b97c5ff39229106f1561aaa2b59586d174a305.zip
Clean up temporary directory in distribute_setup.py. Fixes #328.
--HG-- branch : distribute extra : rebase_source : 430cf77fcf14e26cafbf4ba6abc680efa1fb3570
-rw-r--r--distribute_setup.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/distribute_setup.py b/distribute_setup.py
index d24e2360..cebd80b1 100644
--- a/distribute_setup.py
+++ b/distribute_setup.py
@@ -14,6 +14,7 @@ the appropriate options to ``use_setuptools()``.
This file can also be run as a script to install or upgrade setuptools.
"""
import os
+import shutil
import sys
import time
import fnmatch
@@ -90,6 +91,7 @@ def _install(tarball, install_args=()):
return 2
finally:
os.chdir(old_wd)
+ shutil.rmtree(tmpdir)
def _build_egg(egg, tarball, to_dir):
@@ -114,6 +116,7 @@ def _build_egg(egg, tarball, to_dir):
finally:
os.chdir(old_wd)
+ shutil.rmtree(tmpdir)
# returning the result
log.warn(egg)
if not os.path.exists(egg):