#NEWLINE# def find_all_candidates( self , project_name ) : #NEWLINE# #INDENT# 'Find all available InstallationCandidate for project_name\n\n        This checks index_urls, find_links and dependency_links.\n        All versions found are returned as an InstallationCandidate list.\n\n        See _link_package_versions for details on which files are accepted\n        ' #NEWLINE# index_locations = self . _get_index_urls_locations ( project_name ) #NEWLINE# ( index_file_loc , index_url_loc ) = self . _sort_locations ( index_locations ) #NEWLINE# ( fl_file_loc , fl_url_loc ) = self . _sort_locations ( self . find_links , expand_dir = True ) #NEWLINE# ( dep_file_loc , dep_url_loc ) = self . _sort_locations ( self . dependency_links ) #NEWLINE# file_locations = ( Link ( url ) for url in itertools . chain ( index_file_loc , fl_file_loc , dep_file_loc ) ) #NEWLINE# url_locations = [ link for link in itertools . chain ( ( Link ( url ) for url in index_url_loc ) , ( Link ( url ) for url in fl_url_loc ) , ( Link ( url ) for url in dep_url_loc ) ) if self . _validate_secure_origin ( logger , link ) ] #NEWLINE# logger . debug ( '%d location(s) to search for versions of %s:' , len ( url_locations ) , project_name ) #NEWLINE# for location in url_locations : #NEWLINE# #INDENT# logger . debug ( '* %s' , location ) #NEWLINE# #UNINDENT# canonical_name = canonicalize_name ( project_name ) #NEWLINE# formats = fmt_ctl_formats ( self . format_control , canonical_name ) #NEWLINE# search = Search ( project_name , canonical_name , formats ) #NEWLINE# find_links_versions = self . _package_versions ( ( Link ( url , '-f' ) for url in self . find_links ) , search ) #NEWLINE# page_versions = [ ] #NEWLINE# for page in self . _get_pages ( url_locations , project_name ) : #NEWLINE# #INDENT# logger . debug ( 'Analyzing links from page %s' , page . url ) #NEWLINE# with indent_log ( ) : #NEWLINE# #INDENT# page_versions . extend ( self . _package_versions ( page . links , search ) ) #NEWLINE# #UNINDENT# #UNINDENT# dependency_versions = self . _package_versions ( ( Link ( url ) for url in self . dependency_links ) , search ) #NEWLINE# if dependency_versions : #NEWLINE# #INDENT# logger . debug ( 'dependency_links found: %s' , ', ' . join ( [ version . location . url for version in dependency_versions ] ) ) #NEWLINE# #UNINDENT# file_versions = self . _package_versions ( file_locations , search ) #NEWLINE# if file_versions : #NEWLINE# #INDENT# file_versions . sort ( reverse = True ) #NEWLINE# logger . debug ( 'Local files found: %s' , ', ' . join ( [ url_to_path ( candidate . location . url ) for candidate in file_versions ] ) ) #NEWLINE# #UNINDENT# return ( ( ( file_versions + find_links_versions ) + page_versions ) + dependency_versions )