WheelFile extract does not preserve permissions
In issue #514, the command line for wheel unpack was fixed to preserve executable bit for files.
https://github.com/pypa/wheel/blob/0a4f40ecf967757b43e2cdfd4b3c52b16d15614a/src/wheel/cli/unpack.py#L24
But this issue still exists when extracting files programmatically.
For example:
wheel = WheelFile(wheel_path)
wheel.extractall(temp_dir )
The issue is of course rooted in the same problem. As extractall and extract methods inherit from zipfile.
Maybe it will be better to override these methods for WheelFile and fix the permissions issue there, instead of in the unpack command?
Will you be open for a PR for such a change?
There's the fundamental, underlying issue of the wheel standard not having explicit support for file permissions (as those are platform specific). I'm personally convinced that such support would be useful, but I think it needs to be added to the standard. I don't have the bandwidth available to drive such a change myself though.
Will you be open to a PR that will apply the same fix as in unpack, to make the behavior the same?
Will you be open to a PR that will apply the same fix as in unpack, to make the behavior the same?
Yeah, sure.