the
.dist-infometadata directory MUST be placed at the root of the archive without any compression
No compression at all seems a bit wasteful, with things like license files being put in .dist-info.
Also, AFAIK the current default in setuptools is to use deflate for the whole archive, and pip itself publishes deflate-compressed wheels. I don’t think there’s any practical reason against requiring support for it.
In CPython, zlib is nominally an optional module, but I think that should change.
I suggest:
- Allowing
deflateas well as no compression. (I guessBZIP2&LZMAare unnecessarily progressive for this use case.) - Limiting the restriction to
.dist-info/METADATA(i.e. the file that contains the version). This would allow new wheel versions to specify other compression schemes for individual files – after careful consideration of course.
Practically: tools should either check the version in theMETADATAfile before looking at the whole.dist-infodirectory, or assume that a failure to unpack.dist-infois due to an incompatible wheel version.
+1 to .wheel by the way :)