mirror of https://github.com/pypa/pip
Move directory requirement download logging out of unpack_file_url
One less use of `download_dir` in `unpack_file_url`, which will make it easier to factor out.
This commit is contained in:
parent
0292938f89
commit
554db9230d
|
@ -233,8 +233,6 @@ def unpack_file_url(
|
|||
if os.path.isdir(location):
|
||||
rmtree(location)
|
||||
_copy_source_tree(link_path, location)
|
||||
if download_dir:
|
||||
logger.info('Link is a directory, ignoring download_dir')
|
||||
return None
|
||||
|
||||
# If a download dir is specified, is the file already there and valid?
|
||||
|
@ -544,6 +542,10 @@ class RequirementPreparer(object):
|
|||
req, self.req_tracker, self.finder, self.build_isolation,
|
||||
)
|
||||
|
||||
if link.is_existing_dir():
|
||||
if download_dir:
|
||||
logger.info('Link is a directory, ignoring download_dir')
|
||||
|
||||
if self._download_should_save:
|
||||
# Make a .zip of the source_dir we already created.
|
||||
if link.is_vcs:
|
||||
|
|
Loading…
Reference in New Issue