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

Fix non lowercase distinfo_name on Windows #12

Closed
wants to merge 1 commit into from
Closed

Fix non lowercase distinfo_name on Windows #12

wants to merge 1 commit into from

Conversation

daybarr
Copy link

@daybarr daybarr commented Apr 24, 2017

Fixes #11

setuptools.package_index.PackageIndex used by zc.buildout will have
called, pkg_resources.normalize_path on the location, which in turn
calls os.path.normcase on it, thus lowercasing it on Windows. This means
that when we try to create a wheel.install.WheelFile using the location,
the WheelFile.distinfo_name is calculated from this altered path, so the
WheelFile.record_name uses an incorrectly lowercased version of the
dist-info directory to look for RECORD and as zipfile uses
case-sensitive paths this will fail. Fix by using the exact same case we
have on the filesystem.

This works for me, sorry but I'm not very familiar with the internals of any of this. Hope it helps.

Fixes #11

setuptools.package_index.PackageIndex used by zc.buildout will have
called, pkg_resources.normalize_path on the location, which in turn
calls os.path.normcase on it, thus lowercasing it on Windows. This means
that when we try to create a wheel.install.WheelFile using the location,
the WheelFile.distinfo_name is calculated from this altered path, so the
WheelFile.record_name uses an incorrectly lowercased version of the
dist-info directory to look for RECORD and as zipfile uses
case-sensitive paths this will fail. Fix by using the exact same case we
have on the filesystem.
@daybarr
Copy link
Author

daybarr commented Apr 24, 2017

Ah, looks like I broke things on sensible case-sensitive file systems. Thanks Travis ;)

@daybarr
Copy link
Author

daybarr commented Apr 24, 2017

This doesn't look like a good approach. I'll try something else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant