Commit 18b97c5f authored by g2p's avatar g2p

Clean up temporary directory in distribute_setup.py. Fixes #328.

--HG--
branch : distribute
extra : rebase_source : 430cf77fcf14e26cafbf4ba6abc680efa1fb3570
parent 8e41afb1
......@@ -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):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment