buildout / buildout.wheel

Buildout extension to provide wheel support
MIT License
7 stars 8 forks source link

Fix non lowercase distinfo_name on Windows #12

Closed daybarr closed 7 years ago

daybarr commented 7 years ago

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.

daybarr commented 7 years ago

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

daybarr commented 7 years ago

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