Skip to content

Commit e6cc9e9

Browse files
committed
Do not remove source directory in cleanup_temporary_source
Since nothing in our code writes the delete marker file, this block will never execute.
1 parent 8197a4b commit e6cc9e9

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

src/pip/_internal/req/req_install.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,7 @@
3333
from pip._internal.utils.deprecation import deprecated
3434
from pip._internal.utils.hashes import Hashes
3535
from pip._internal.utils.logging import indent_log
36-
from pip._internal.utils.marker_files import (
37-
PIP_DELETE_MARKER_FILENAME,
38-
has_delete_marker_file,
39-
)
36+
from pip._internal.utils.marker_files import PIP_DELETE_MARKER_FILENAME
4037
from pip._internal.utils.misc import (
4138
ask_path_exists,
4239
backup_dir,
@@ -46,7 +43,6 @@
4643
get_installed_version,
4744
hide_url,
4845
redact_auth_from_url,
49-
rmtree,
5046
)
5147
from pip._internal.utils.packaging import get_metadata
5248
from pip._internal.utils.temp_dir import TempDirectory, tempdir_kinds
@@ -423,11 +419,6 @@ def warn_on_mismatching_name(self):
423419

424420
def remove_temporary_source(self):
425421
# type: () -> None
426-
"""Remove the source files from this requirement, if they are marked
427-
for deletion"""
428-
if self.source_dir and has_delete_marker_file(self.source_dir):
429-
logger.debug('Removing source in %s', self.source_dir)
430-
rmtree(self.source_dir)
431422
self.source_dir = None
432423
self._temp_build_dir = None
433424

0 commit comments

Comments
 (0)