Skip to content

Extract downloaded file copying from operations.prepare #7570

@chrahunt

Description

@chrahunt

What's the problem this feature will solve?

For pip download and pip wheel, pip copies downloaded files to the output directory while it is doing preparation of requirements here.

Pulling this logic out of operations.prepare will allow us more flexibility to implement the new resolver without breaking pip download or pip wheel, because:

  1. we will not be obligated to re-use RequirementPreparer in order to have files downloaded
  2. we will not have to implement the same functionality in new objects collaborating to do the new dependency resolution

Describe the solution you'd like

Do what the code here is doing, except in pip._internal.commands.DownloadCommand and pip._internal.commands.WheelCommand.

Alternative Solutions

  1. Keep the logic for downloads in RequirementPreparer - since RequirementPreparer is so tightly coupled to Resolver we are unlikely to use it for the new resolver, so we would need to worry about reimplementing this logic

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions