Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
0bec35d2
Commit
0bec35d2
authored
Jul 07, 2011
by
Vinay Sajip
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Closes #12391: temporary files are now cleaned up.
parent
cd9f1203
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
Lib/packaging/install.py
Lib/packaging/install.py
+5
-7
No files found.
Lib/packaging/install.py
View file @
0bec35d2
...
...
@@ -42,10 +42,7 @@ def _move_files(files, destination):
: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
]
...
...
@@ -126,8 +123,11 @@ def install_local_project(path):
elif
_is_archive_file
(
path
):
logger
.
info
(
'Installing from archive: %s'
,
path
)
_unpacked_dir
=
tempfile
.
mkdtemp
()
shutil
.
unpack_archive
(
path
,
_unpacked_dir
)
return
_run_install_from_archive
(
_unpacked_dir
)
try
:
shutil
.
unpack_archive
(
path
,
_unpacked_dir
)
return
_run_install_from_archive
(
_unpacked_dir
)
finally
:
shutil
.
rmtree
(
_unpacked_dir
)
else
:
logger
.
warning
(
'No projects to install.'
)
return
False
...
...
@@ -179,8 +179,6 @@ def install_dists(dists, path, paths=None):
: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
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment