def _link_package_versions(self, link, search_name):
if link.egg_fragment:<EOL><INDENT>egg_info = link.egg_fragment<EOL><DEDENT>else:<EOL><INDENT>egg_info, ext = link.splitext()<EOL>if not ext:<EOL><INDENT>if link not in self.logged_links:<EOL><INDENT>logger.debug('<STR_LIT>' % link)<EOL>self.logged_links.add(link)<EOL><DEDENT>return []<EOL><DEDENT>if egg_info.endswith('<STR_LIT>'):<EOL><INDENT>egg_info = egg_info[:-<NUM_LIT:4>]<EOL>ext = '<STR_LIT>' + ext<EOL><DEDENT>if ext not in ('<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>'):<EOL><INDENT>if link not in self.logged_links:<EOL><INDENT>logger.debug('<STR_LIT>' % (link, ext))<EOL>self.logged_links.add(link)<EOL><DEDENT>return []<EOL><DEDENT>if "<STR_LIT>" in link.path and ext == '<STR_LIT>':<EOL><INDENT>if link not in self.logged_links:<EOL><INDENT>logger.debug('<STR_LIT>' % (link))<EOL>self.logged_links.add(link)<EOL><DEDENT>return []<EOL><DEDENT><DEDENT>version = self._egg_info_matches(egg_info, search_name, link)<EOL>if version is None:<EOL><INDENT>logger.debug('<STR_LIT>' % (link, search_name))<EOL>return []<EOL><DEDENT>match = self._py_version_re.search(version)<EOL>if match:<EOL><INDENT>version = version[:match.start()]<EOL>py_version = match.group(<NUM_LIT:1>)<EOL>if py_version != sys.version[:<NUM_LIT:3>]:<EOL><INDENT>logger.debug('<STR_LIT>' % link)<EOL>return []<EOL><DEDENT><DEDENT>logger.debug('<STR_LIT>' % (link, version))<EOL>return [(pkg_resources.parse_version(version),<EOL>link,<EOL>version)]<EOL>
Return an iterable of triples (pkg_resources_version_key,
link, python_version) that can be extracted from the given
link.

Meant to be overridden by subclasses, not called by clients.