The RECORD file is a partial list of files in the wheel and their hashes. Quoting from PEP 0491:
RECORD is a list of (almost) all the files in the wheel and their secure hashes. Unlike PEP 376, every file except RECORD, which cannot contain a hash of itself, must include its hash. The hash algorithm must be sha256 or better; specifically, md5 and sha1 are not permitted, as signed wheel files rely on the strong hashes in RECORD to validate the integrity of the archive.
It's incredibly useful to have this inside the wheel at installation time, but if the target is not going to be managed by a python package manager then it's just pointless. For example, a Linux distribution package of Python won't need the RECORD file: it already has tooling for the list of files and their hashes.
The rationale to remove the file entirely instead of just ignoring it is that when the file is present, pip thinks it can use it. This means sudo pip can remove files from the system packages, which is asking for trouble.
The
RECORD
file is a partial list of files in the wheel and their hashes. Quoting from PEP 0491:It's incredibly useful to have this inside the wheel at installation time, but if the target is not going to be managed by a python package manager then it's just pointless. For example, a Linux distribution package of Python won't need the RECORD file: it already has tooling for the list of files and their hashes.
The rationale to remove the file entirely instead of just ignoring it is that when the file is present, pip thinks it can use it. This means
sudo pip
can remove files from the system packages, which is asking for trouble.Interesting prior art:
Instead of these tools having to go in and remove files, it would be nice if installer had an option to stop it writing the file in the first place.