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

Use canonicalize_name to look for .dist-info in wheel files #1360

Merged
merged 2 commits into from May 17, 2018

Conversation

Projects
None yet
2 participants
@wiggin15
Contributor

wiggin15 commented May 15, 2018

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

canonicalize_name(dirname).startswith(
canonicalize_name(self.project_name))):
return dirname
raise ValueError("unsupported wheel format. .dist-info not found")

This comment has been minimized.

@pganssle

pganssle May 15, 2018

Member

This line is still not covered. Can you add a test for it?

@wiggin15 wiggin15 force-pushed the Infinidat:issue1350 branch from c1dc1c5 to e49413f May 15, 2018

@wiggin15

This comment has been minimized.

Contributor

wiggin15 commented May 15, 2018

I updated the PR with the new test.

@pganssle pganssle force-pushed the Infinidat:issue1350 branch from e49413f to 59f0342 May 15, 2018

pganssle added a commit to Infinidat/setuptools that referenced this pull request May 15, 2018

@wiggin15

This comment has been minimized.

Contributor

wiggin15 commented May 16, 2018

@pganssle it looks like you edited the commit and it's without the new test now. How do we proceed?

wiggin15 added a commit to Infinidat/setuptools that referenced this pull request May 16, 2018

@pganssle

This comment has been minimized.

Member

pganssle commented May 16, 2018

@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.

@wiggin15 wiggin15 force-pushed the Infinidat:issue1350 branch from 59f0342 to 70c786b May 16, 2018

@wiggin15

This comment has been minimized.

Contributor

wiggin15 commented May 16, 2018

Updated with force push.

@pganssle

This comment has been minimized.

Member

pganssle commented May 17, 2018

LGTM.

@pganssle pganssle merged commit 5832e76 into pypa:master May 17, 2018

5 checks passed

codecov/patch 100% of diff hit (target 81.46%)
Details
codecov/project 81.51% (+0.04%) compared to 1252d1b
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
deploy/netlify Deploy preview ready!
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment