def prefer_url(self, url1, url2):
result = url2<EOL>if url1:<EOL><INDENT>s1 = self.score_url(url1)<EOL>s2 = self.score_url(url2)<EOL>if s1 > s2:<EOL><INDENT>result = url1<EOL><DEDENT>if result != url2:<EOL><INDENT>logger.debug('<STR_LIT>', url1, url2)<EOL><DEDENT>else:<EOL><INDENT>logger.debug('<STR_LIT>', url1, url2)<EOL><DEDENT><DEDENT>return result<EOL>
Choose one of two URLs where both are candidates for distribution
archives for the same version of a distribution (for example,
.tar.gz vs. zip).

The current implement favours http:// URLs over https://, archives
from PyPI over those from other locations and then the archive name.