MrMino / wheelfile

🔪🧀 API for creating and inspecting Python .whl files (wheels)
MIT License
29 stars 5 forks source link

Mishandling of directories in `RECORD` and the resulting archive #11

Closed MrMino closed 3 years ago

MrMino commented 3 years ago

The specification at https://packaging.python.org/specifications/recording-installed-packages/#the-record-file specifically states that RECORD should not contain entries related to directories. Currently, all write methods of WheelFile inadvertently add them.

WheelRecord should prohibit adding directory entries.

Whether the entries for them should be added is not explicitly specified in the specs, but generally they are omitted by all of the tools. Introduce a default skipdir arg to WheelFile write methods that make them skip directories.

See pypa/pip#10118.

MrMino commented 3 years ago

Fixed in v0.0.7.