def score_url(self, url):
t = urlparse(url)<EOL>basename = posixpath.basename(t.path)<EOL>compatible = True<EOL>is_wheel = basename.endswith('<STR_LIT>')<EOL>is_downloadable = basename.endswith(self.downloadable_extensions)<EOL>if is_wheel:<EOL><INDENT>compatible = is_compatible(Wheel(basename), self.wheel_tags)<EOL><DEDENT>return (t.scheme == '<STR_LIT>', '<STR_LIT>' in t.netloc,<EOL>is_downloadable, is_wheel, compatible, basename)<EOL>
Give an url a score which can be used to choose preferred URLs
for a given project release.