-
Notifications
You must be signed in to change notification settings - Fork 53
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
Search wheels for .dist-info
directories
#137
Conversation
a2ab99f
to
80e8660
Compare
Is there anything I can do to help get this merged? I've been running into this problem when using bazel to install wheels with capitalization issues. |
Ping? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, with one non-blocking suggestion.
Lemme know if you'd prefer that I merge without that change. :)
src/installer/utils.py
Outdated
@@ -93,6 +93,14 @@ def parse_metadata_file(contents: str) -> Message: | |||
return feed_parser.close() | |||
|
|||
|
|||
def normalize_distribution_name(name: str) -> str: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm... this might be easier to parse for folks if this has the same name as the packaging
function.
def normalize_distribution_name(name: str) -> str: | |
def canonicalize_name(name: str) -> str: |
src/installer/sources.py
Outdated
norm_di_dname = normalize_distribution_name(di_dname) | ||
norm_file_dname = normalize_distribution_name(self.distribution) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
norm_di_dname = normalize_distribution_name(di_dname) | |
norm_file_dname = normalize_distribution_name(self.distribution) | |
norm_di_dname = canonicalize_name(di_dname) | |
norm_file_dname = canonicalize_name(self.distribution) |
80e8660
to
ac40283
Compare
TestWheelFile.test_finds_dist_info is failing on 3.7. |
This PR needs fixes for the failure identified in CI.
Some wheels don't use canonicalized names for their .dist-info directories, so search the wheel for them. Fixes: pypa#134
At least, once they are both normalized.
Applied your name suggestion, and rebased on top of master.
Added a workaround for that in a separate commit, that's easy to revert later. |
ac40283
to
49e86a4
Compare
for more information, see https://pre-commit.ci
.dist-info
directories
Some wheels don't use normalized names for their
.dist-info
directories, so search the wheel for them.Fixes: #134