get_metadata_for_wheel returns the first match for name.endswith(".dist-info/METADATA"). This is a bad assumption. A wheel can contain multiple .dist-info directories. It's common to include dist-info directories of vendored packages.
get_metadata_for_wheel should only look at dist-info directories in the root of the wheel. Or better: parse the URL, split the name, and use {dist_name}-{dist_version}.dist-info/METADATA.
get_metadata_for_wheelreturns the first match forname.endswith(".dist-info/METADATA"). This is a bad assumption. A wheel can contain multiple.dist-infodirectories. It's common to include dist-info directories of vendored packages.get_metadata_for_wheelshould only look atdist-infodirectories in the root of the wheel. Or better: parse the URL, split the name, and use{dist_name}-{dist_version}.dist-info/METADATA.