[moved from python-dev]
Possibly also useful (if only to standardise the approach) would be a
method to check hashes against installed files.
Added as Distribution.check_installed_files() in distlib repo. Docstring:
""" Checks that the hashes and sizes of the files in ``RECORD`` are matched by the files themselves. Returns a (possibly empty) list of mismatches. Each entry in the mismatch list will be a tuple consisting of the path, 'exists', 'size' or 'hash' according to what didn't match (existence is checked first, then size, then hash), the expected value and the actual value. """