def lookup_candidates(pkg, version):
finder = PackageFinder(
find_links=[],
format_control=FormatControl(set([":all:"]), set()),
index_urls=[_DEFAULT_INDEX],
session=PipSession())
for candidate in finder.find_all_candidates(pkg):
if str(candidate.version) == version:
return candidate.location
return None
评论列表
文章目录