fromzipfileimportZipFilefrompip._vendor.pkg_resourcesimportDistributionfrompip._internal.distributions.baseimportAbstractDistributionfrompip._internal.index.package_finderimportPackageFinderfrompip._internal.utils.wheelimportpkg_resources_distribution_for_wheelclassWheelDistribution(AbstractDistribution):"""Represents a wheel distribution. This does not need any preparation as wheels can be directly unpacked. """defget_pkg_resources_distribution(self):# type: () -> Distribution"""Loads the metadata from the wheel file into memory and returns a Distribution that uses it, not relying on the wheel file or requirement. """# Set as part of preparation during download.assertself.req.local_file_path# Wheels are never unnamed.assertself.req.namewithZipFile(self.req.local_file_path,allowZip64=True)asz:returnpkg_resources_distribution_for_wheel(z,self.req.name,self.req.local_file_path)defprepare_distribution_metadata(self,finder,build_isolation):# type: (PackageFinder, bool) -> Nonepass