diff options
author | tarek <tarek@ziade.org> | 2009-07-17 15:18:52 +0200 |
---|---|---|
committer | tarek <tarek@ziade.org> | 2009-07-17 15:18:52 +0200 |
commit | bab0fa4b516bb7be94a5b498592cc1791e23c538 (patch) | |
tree | 46740e42e0d798d04917e2a052d015b4d36b41a8 | |
parent | 13dbd1a112abfa94cac76f99b38df7fbd1fd79b1 (diff) | |
parent | d7db8bf8f402130e3ce49603ead50de5f7a4d6b2 (diff) | |
download | external_python_setuptools-bab0fa4b516bb7be94a5b498592cc1791e23c538.tar.gz external_python_setuptools-bab0fa4b516bb7be94a5b498592cc1791e23c538.tar.bz2 external_python_setuptools-bab0fa4b516bb7be94a5b498592cc1791e23c538.zip |
merged Hanno changes
--HG--
branch : distribute
extra : rebase_source : 2e46353034168a7bcd07262487eb3441f9dce383
-rw-r--r-- | CHANGES.txt | 5 | ||||
-rwxr-xr-x | setuptools.txt | 1 | ||||
-rwxr-xr-x | setuptools/sandbox.py | 7 |
3 files changed, 8 insertions, 5 deletions
diff --git a/CHANGES.txt b/CHANGES.txt index b8ab122a..13a54b05 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -3,9 +3,12 @@ CHANGES ======= setuptools ---------- +---------- 0.6final + * Packages required at build time where not fully present at install time. + This closes http://bitbucket.org/tarek/distribute/issue/12. + * Protected against failures in tarfile extraction. This closes http://bitbucket.org/tarek/distribute/issue/10. diff --git a/setuptools.txt b/setuptools.txt index 4d3f79fa..255429b4 100755 --- a/setuptools.txt +++ b/setuptools.txt @@ -2606,7 +2606,6 @@ XXX XXX - Mailing List and Bug Tracker ============================ diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 97865dd9..11c14938 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -6,10 +6,8 @@ from distutils.errors import DistutilsError __all__ = [ "AbstractSandbox", "DirectorySandbox", "SandboxViolation", "run_setup", ] - def run_setup(setup_script, args): """Run a distutils setup script, sandboxed in its directory""" - old_dir = os.getcwd() save_argv = sys.argv[:] save_path = sys.path[:] @@ -17,7 +15,7 @@ def run_setup(setup_script, args): temp_dir = os.path.join(setup_dir,'temp') if not os.path.isdir(temp_dir): os.makedirs(temp_dir) save_tmp = tempfile.tempdir - + save_modules = sys.modules.copy() try: tempfile.tempdir = temp_dir os.chdir(setup_dir) @@ -35,6 +33,9 @@ def run_setup(setup_script, args): raise # Normal exit, just return finally: + sys.modules.update(save_modules) + for key in list(sys.modules): + if key not in save_modules: del sys.modules[key] os.chdir(old_dir) sys.path[:] = save_path sys.argv[:] = save_argv |