Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(4)

Unified Diff: Lib/packaging/install.py

Issue 10639: reindent.py converts newlines to platform default
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Lib/packaging/database.py ('k') | Lib/packaging/tests/__main__.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Lib/packaging/install.py Tue Jul 26 09:37:46 2011 +0300
+++ b/Lib/packaging/install.py Mon Jul 25 09:47:18 2011 -0400
@@ -42,7 +42,10 @@
:param files: a list of files to move.
:param destination: the destination directory to put on the files.
+ if not defined, create a new one, using mkdtemp
"""
+ if not destination:
+ destination = tempfile.mkdtemp()
for old in files:
filename = os.path.split(old)[-1]
@@ -123,11 +126,8 @@
elif _is_archive_file(path):
logger.info('Installing from archive: %s', path)
_unpacked_dir = tempfile.mkdtemp()
- try:
- shutil.unpack_archive(path, _unpacked_dir)
- return _run_install_from_archive(_unpacked_dir)
- finally:
- shutil.rmtree(_unpacked_dir)
+ shutil.unpack_archive(path, _unpacked_dir)
+ return _run_install_from_archive(_unpacked_dir)
else:
logger.warning('No projects to install.')
return False
@@ -179,6 +179,8 @@
:param path: base path to install distribution in
:param paths: list of paths (defaults to sys.path) to look for info
"""
+ if not path:
+ path = tempfile.mkdtemp()
installed_dists = []
for dist in dists:
« no previous file with comments | « Lib/packaging/database.py ('k') | Lib/packaging/tests/__main__.py » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+