def _yield_distributions(self):
<EOL>seen = set()<EOL>for path in self.path:<EOL><INDENT>finder = resources.finder_for_path(path)<EOL>if finder is None:<EOL><INDENT>continue<EOL><DEDENT>r = finder.find('<STR_LIT>')<EOL>if not r or not r.is_container:<EOL><INDENT>continue<EOL><DEDENT>rset = sorted(r.resources)<EOL>for entry in rset:<EOL><INDENT>r = finder.find(entry)<EOL>if not r or r.path in seen:<EOL><INDENT>continue<EOL><DEDENT>if self._include_dist and entry.endswith(DISTINFO_EXT):<EOL><INDENT>metadata_path = posixpath.join(entry, METADATA_FILENAME)<EOL>pydist = finder.find(metadata_path)<EOL>if not pydist:<EOL><INDENT>continue<EOL><DEDENT>metadata = Metadata(fileobj=pydist.as_stream(),<EOL>scheme='<STR_LIT>')<EOL>logger.debug('<STR_LIT>', r.path)<EOL>seen.add(r.path)<EOL>yield new_dist_class(r.path, metadata=metadata,<EOL>env=self)<EOL><DEDENT>elif self._include_egg and entry.endswith(('<STR_LIT>',<EOL>'<STR_LIT>')):<EOL><INDENT>logger.debug('<STR_LIT>', r.path)<EOL>seen.add(r.path)<EOL>yield old_dist_class(r.path, self)<EOL><DEDENT><DEDENT><DEDENT>
Yield .dist-info and/or .egg(-info) distributions.