(self, result_type_wheel_file=False)
| 281 | return self._source_pex or self._pex |
| 282 | |
| 283 | def iter_distributions(self, result_type_wheel_file=False): |
| 284 | # type: (bool) -> Iterator[FingerprintedDistribution] |
| 285 | if result_type_wheel_file and self._pex_info.deps_are_wheel_files: |
| 286 | with TRACER.timed( |
| 287 | "Searching dependency cache: {cache}".format( |
| 288 | cache=os.path.join(self.source_pex, self._pex_info.internal_cache) |
| 289 | ), |
| 290 | V=2, |
| 291 | ): |
| 292 | with identify_layout(self.source_pex) as layout: |
| 293 | for distribution_name, fingerprint in self._pex_info.distributions.items(): |
| 294 | yield FingerprintedDistribution( |
| 295 | distribution=Distribution.load( |
| 296 | layout.wheel_file_path( |
| 297 | (self._pex_info.internal_cache, distribution_name) |
| 298 | ) |
| 299 | ), |
| 300 | fingerprint=fingerprint, |
| 301 | ) |
| 302 | else: |
| 303 | internal_cache = os.path.join(self._pex, self._pex_info.internal_cache) |
| 304 | with TRACER.timed( |
| 305 | "Searching dependency cache: {cache}".format(cache=internal_cache), V=2 |
| 306 | ): |
| 307 | for distribution_name, fingerprint in self._pex_info.distributions.items(): |
| 308 | dist_path = os.path.join(internal_cache, distribution_name) |
| 309 | if result_type_wheel_file: |
| 310 | yield repacked_whl( |
| 311 | installed_wheel=dist_path, |
| 312 | distribution_name=distribution_name, |
| 313 | fingerprint=fingerprint, |
| 314 | use_system_time=True, |
| 315 | ) |
| 316 | else: |
| 317 | yield FingerprintedDistribution( |
| 318 | distribution=Distribution.load(dist_path), fingerprint=fingerprint |
| 319 | ) |
| 320 | |
| 321 | def _update_candidate_distributions(self, distribution_iter): |
| 322 | # type: (Iterable[FingerprintedDistribution]) -> None |
no test coverage detected