Use canonicalize_name to look for .dist-info in wheel files#1360
Merged
Conversation
pganssle
reviewed
May 15, 2018
| canonicalize_name(dirname).startswith( | ||
| canonicalize_name(self.project_name))): | ||
| return dirname | ||
| raise ValueError("unsupported wheel format. .dist-info not found") |
Member
There was a problem hiding this comment.
This line is still not covered. Can you add a test for it?
Author
|
I updated the PR with the new test. |
pganssle
added a commit
to Infinidat/setuptools
that referenced
this pull request
May 15, 2018
Author
|
@pganssle it looks like you edited the commit and it's without the new test now. How do we proceed? |
wiggin15
pushed a commit
to Infinidat/setuptools
that referenced
this pull request
May 16, 2018
Member
|
@wiggin15 Damn, that's entirely my bad. Do you still have your version of the code? Can you do a force push? I might be able to recover the original test from my git history. |
Author
|
Updated with force push. |
Member
|
LGTM. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
wheel files contain a directory that ends with ".dist-info", but its full name may not exactly match the name of the package as written in the wheel filename. e.g. on Windows, the wheel file name may use different letter cases. Using canonicalize_name on both the package name from the wheel filename and the directories in the zip to find a match fixes the problem.
See issue #1350
The general logic was taken from the pip code: https://github.com/pypa/pip/blob/0ae0109901f63b7f133229a9fee41332dd7366b4/src/pip/_internal/wheel.py#L270