capybara/virtualenv/lib/python2.7/site-packages/pip/index.py
def _get_index_urls_locations(self, project_name):
        """Returns the locations found via self.index_urls

        Checks the url_name on the main (first in the list) index and
        use this url_name to produce all locations
        """

        def mkurl_pypi_url(url):
            loc = posixpath.join(url, project_url_name)
            # For maximum compatibility with easy_install, ensure the path
            # ends in a trailing slash.  Although this isn't in the spec
            # (and PyPI can handle it without the slash) some other index
            # implementations might break if they relied on easy_install's
            # behavior.
            if not loc.endswith('/'):
                loc = loc + '/'
            return loc

        project_url_name = urllib_parse.quote(project_name.lower())

        if self.index_urls:
            # Check that we have the url_name correctly spelled:

            # Only check main index if index URL is given
            main_index_url = Link(
                mkurl_pypi_url(self.index_urls[0]),
                trusted=True,
            )

            page = self._get_page(main_index_url)
            if page is None and PyPI.netloc not in str(main_index_url):
                warnings.warn(
                    "Failed to find %r at %s. It is suggested to upgrade "
                    "your index to support normalized names as the name in "
                    "/simple/{name}." % (project_name, main_index_url),
                    RemovedInPip8Warning,
                )

                project_url_name = self._find_url_name(
                    Link(self.index_urls[0], trusted=True),
                    project_url_name,
                ) or project_url_name

        if project_url_name is not None:
            return [mkurl_pypi_url(url) for url in self.index_urls]
        return []
def _get_index_urls_locations(self, project_name):
        """Returns the locations found via self.index_urls

        Checks the url_name on the main (first in the list) index and
        use this url_name to produce all locations
        """

        def mkurl_pypi_url(url):
            loc = posixpath.join(url, project_url_name)
            # For maximum compatibility with easy_install, ensure the path
            # ends in a trailing slash.  Although this isn't in the spec
            # (and PyPI can handle it without the slash) some other index
            # implementations might break if they relied on easy_install's
            # behavior.
            if not loc.endswith('/'):
                loc = loc + '/'
            return loc

        project_url_name = urllib_parse.quote(project_name.lower())

        if self.index_urls:
            # Check that we have the url_name correctly spelled:

            # Only check main index if index URL is given
            main_index_url = Link(
                mkurl_pypi_url(self.index_urls[0]),
                trusted=True,
            )

            page = self._get_page(main_index_url)
            if page is None and PyPI.netloc not in str(main_index_url):
                warnings.warn(
                    "Failed to find %r at %s. It is suggested to upgrade "
                    "your index to support normalized names as the name in "
                    "/simple/{name}." % (project_name, main_index_url),
                    RemovedInPip8Warning,
                )

                project_url_name = self._find_url_name(
                    Link(self.index_urls[0], trusted=True),
                    project_url_name,
                ) or project_url_name

        if project_url_name is not None:
            return [mkurl_pypi_url(url) for url in self.index_urls]
        return []
def _get_index_urls_locations ( self , project_name ) : def mkurl_pypi_url ( url ) : loc = posixpath . join ( url , project_url_name ) # For maximum compatibility with easy_install, ensure the path # ends in a trailing slash.  Although this isn't in the spec # (and PyPI can handle it without the slash) some other index # implementations might break if they relied on easy_install's # behavior. if not loc . endswith ( '/' ) : loc = loc + '/' return loc project_url_name = urllib_parse . quote ( project_name . lower ( ) ) if self . index_urls : # Check that we have the url_name correctly spelled: # Only check main index if index URL is given main_index_url = Link ( mkurl_pypi_url ( self . index_urls [ 0 ] ) , trusted = True , ) page = self . _get_page ( main_index_url ) if page is None and PyPI . netloc not in str ( main_index_url ) : warnings . warn ( "Failed to find %r at %s. It is suggested to upgrade " "your index to support normalized names as the name in " "/simple/{name}." % ( project_name , main_index_url ) , RemovedInPip8Warning , ) project_url_name = self . _find_url_name ( Link ( self . index_urls [ 0 ] , trusted = True ) , project_url_name , ) or project_url_name if project_url_name is not None : return [ mkurl_pypi_url ( url ) for url in self . index_urls ] return [ ]
Returns the locations found via self.index_urls

        Checks the url_name on the main (first in the list) index and
        use this url_name to produce all locations
Returns the locations found via self . index_urls