(self, project_name)
return file_versions + find_links_versions + page_versions
Find all available InstallationCandidate for project_name

        This checks index_urls and find_links.
        All versions found are returned as an InstallationCandidate list.

        See LinkEvaluator.evaluate_link() for details on which files
        are accepted.
Find all available InstallationCandidate for project_name
Find all available InstallationCandidate for project_name
def find_all_candidates(self, project_name):
        # type: (str) -> List[InstallationCandidate]
        """Find all available InstallationCandidate for project_name

        This checks index_urls and find_links.
        All versions found are returned as an InstallationCandidate list.

        See LinkEvaluator.evaluate_link() for details on which files
        are accepted.
        """
        search_scope = self.search_scope
        index_locations = search_scope.get_index_urls_locations(project_name)
        index_file_loc, index_url_loc = self._sort_locations(index_locations)
        fl_file_loc, fl_url_loc = self._sort_locations(
            self.find_links, expand_dir=True,
        )

        file_locations = (Link(url) for url in itertools.chain(
            index_file_loc, fl_file_loc,
        ))

        # We trust every url that the user has given us whether it was given
        #   via --index-url or --find-links.
        # We want to filter out any thing which does not have a secure origin.
        url_locations = [
            link for link in itertools.chain(
                (Link(url) for url in index_url_loc),
                (Link(url) for url in fl_url_loc),
            )
            if self._validate_secure_origin(logger, link)
        ]

        logger.debug('%d location(s) to search for versions of %s:',
                     len(url_locations), project_name)

        for location in url_locations:
            logger.debug('* %s', location)

        link_evaluator = self.make_link_evaluator(project_name)
        find_links_versions = self._package_versions(
            link_evaluator,
            # We trust every directly linked archive in find_links
            (Link(url, '-f') for url in self.find_links),
        )

        page_versions = []
        for page in self._get_pages(url_locations, project_name):
            logger.debug('Analyzing links from page %s', page.url)
            with indent_log():
                page_versions.extend(
                    self._package_versions(link_evaluator, page.iter_links())
                )

        file_versions = self._package_versions(link_evaluator, file_locations)
        if file_versions:
            file_versions.sort(reverse=True)
            logger.debug(
                'Local files found: %s',
                ', '.join([
                    url_to_path(candidate.link.url)
                    for candidate in file_versions
                ])
            )

        # This is an intentional priority ordering
        return file_versions + find_links_versions + page_versions
def find_all_candidates ( self , project_name ) : # type: (str) -> List[InstallationCandidate] search_scope = self . search_scope index_locations = search_scope . get_index_urls_locations ( project_name ) index_file_loc , index_url_loc = self . _sort_locations ( index_locations ) fl_file_loc , fl_url_loc = self . _sort_locations ( self . find_links , expand_dir = True , ) file_locations = ( Link ( url ) for url in itertools . chain ( index_file_loc , fl_file_loc , ) ) # We trust every url that the user has given us whether it was given #   via --index-url or --find-links. # We want to filter out any thing which does not have a secure origin. url_locations = [ link for link in itertools . chain ( ( Link ( url ) for url in index_url_loc ) , ( Link ( url ) for url in fl_url_loc ) , ) if self . _validate_secure_origin ( logger , link ) ] logger . debug ( '%d location(s) to search for versions of %s:' , len ( url_locations ) , project_name ) for location in url_locations : logger . debug ( '* %s' , location ) link_evaluator = self . make_link_evaluator ( project_name ) find_links_versions = self . _package_versions ( link_evaluator , # We trust every directly linked archive in find_links ( Link ( url , '-f' ) for url in self . find_links ) , ) page_versions = [ ] for page in self . _get_pages ( url_locations , project_name ) : logger . debug ( 'Analyzing links from page %s' , page . url ) with indent_log ( ) : page_versions . extend ( self . _package_versions ( link_evaluator , page . iter_links ( ) ) ) file_versions = self . _package_versions ( link_evaluator , file_locations ) if file_versions : file_versions . sort ( reverse = True ) logger . debug ( 'Local files found: %s' , ', ' . join ( [ url_to_path ( candidate . link . url ) for candidate in file_versions ] ) ) # This is an intentional priority ordering return file_versions + find_links_versions + page_versions