Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add downloaded/local archive path to InstallRequirement #7483

Merged
merged 4 commits into from
Dec 15, 2019

Conversation

chrahunt
Copy link
Member

@chrahunt chrahunt commented Dec 14, 2019

Makes the downloaded archive available on InstallRequirement, which allows us to separate different phases of package processing. As an example, we now install directly from a wheel file (from the perspective of InstallRequirement) instead of from an unpacked wheel in source_dir.

Progresses #7049.

This will help us avoid some complicated directory-changing logic in
WheelBuilder.
Since it tests install_unpacked_wheel, the coverage should be the same.
Now we'll be able to transition other parts of the code to use
pre-existing archives directly instead of relying on unpacked sources.
This removes one of usages of the overloaded `source_dir` member.

We know the local_file_path must be set at this point because it is set
in the only 3 places that wheels are added to InstallRequirement.
@chrahunt chrahunt added type: refactor Refactoring code skip news Does not need a NEWS file entry (eg: trivial changes) labels Dec 14, 2019
@chrahunt chrahunt changed the title Install packed wheel instead of unpacked wheel Add downloaded/local archive path to InstallRequirement Dec 14, 2019
@chrahunt chrahunt marked this pull request as ready for review December 14, 2019 20:21
@sbidoul
Copy link
Member

sbidoul commented Dec 15, 2019

Does this mean the should_unpack code path in wheel_builder could be simplified, by removing the unpacking?

@chrahunt
Copy link
Member Author

Yes, it will. In a follow-up I was going to refactor it away and just unconditionally assign the built wheel path.

@chrahunt chrahunt merged commit d6491fe into pypa:master Dec 15, 2019
@chrahunt chrahunt deleted the refactor/install-packed-wheel branch December 15, 2019 15:50
@chrahunt
Copy link
Member Author

Thanks both of you for taking a look!

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jan 15, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Jan 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation skip news Does not need a NEWS file entry (eg: trivial changes) type: refactor Refactoring code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants