mirror of
https://github.com/pypa/pip
synced 2023-12-13 21:30:23 +01:00
Record on the requirement whether it has been successfully downloaded
This commit is contained in:
parent
6f154f5546
commit
89bf3b02db
|
@ -133,7 +133,8 @@ class DownloadCommand(RequirementCommand):
|
|||
)
|
||||
|
||||
downloaded = ' '.join([
|
||||
req.name for req in requirement_set.successfully_downloaded
|
||||
req.name for req in requirement_set.requirements.values()
|
||||
if req.successfully_downloaded
|
||||
])
|
||||
if downloaded:
|
||||
write_output('Successfully downloaded %s', downloaded)
|
||||
|
|
|
@ -395,7 +395,7 @@ class Resolver(object):
|
|||
# XXX: --no-install leads this to report 'Successfully
|
||||
# downloaded' for only non-editable reqs, even though we took
|
||||
# action on them.
|
||||
requirement_set.successfully_downloaded.append(req_to_install)
|
||||
req_to_install.successfully_downloaded = True
|
||||
|
||||
return more_reqs
|
||||
|
||||
|
|
|
@ -165,6 +165,15 @@ class InstallRequirement(object):
|
|||
self.prepared = False
|
||||
self.is_direct = False
|
||||
|
||||
# Set by the legacy resolver when the requirement has been downloaded
|
||||
# TODO: This introduces a strong coupling between the resolver and the
|
||||
# requirement (the coupling was previously between the resolver
|
||||
# and the requirement set). This should be refactored to allow
|
||||
# the requirement to decide for itself when it has been
|
||||
# successfully downloaded - but that is more tricky to get right,
|
||||
# se we are making the change in stages.
|
||||
self.successfully_downloaded = False
|
||||
|
||||
self.isolated = isolated
|
||||
self.build_env = NoOpBuildEnvironment() # type: BuildEnvironment
|
||||
|
||||
|
|
|
@ -32,7 +32,6 @@ class RequirementSet(object):
|
|||
self.check_supported_wheels = check_supported_wheels
|
||||
|
||||
self.unnamed_requirements = [] # type: List[InstallRequirement]
|
||||
self.successfully_downloaded = [] # type: List[InstallRequirement]
|
||||
|
||||
def __str__(self):
|
||||
# type: () -> str
|
||||
|
|
Loading…
Reference in a new issue