1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00

Fix pip to work with the --extra-index-url option.

For example, easy_installing TurboGears2 entails:

easy_install -i http://www.turbogears.org/2.0/downloads/current/index tg.devtools

yet, adding the extra index url in pip doesn't seem to work:

./pip.py bundle MyBundle.pybundle -r stable-reqs.txt --extra-index-url=http://www.turbogears.org/2.0/downloads/current/index

This change appears to fix this issue, allowing the creation of pip bundles
containing TurboGears2.
This commit is contained in:
Luke Macken 2009-03-11 16:22:53 -04:00
parent f3e65ea480
commit 59e05b1111

2
pip.py
View file

@ -1009,7 +1009,7 @@ class PackageFinder(object):
# This will also cache the page, so it's okay that we get it again later:
page = self._get_page(main_index_url, req)
if page is None:
url_name = self._find_url_name(Link(self.index_urls[0]), url_name, req)
url_name = self._find_url_name(Link(self.index_urls[0]), url_name, req) or req.url_name
def mkurl_pypi_url(url):
loc = posixpath.join(url, url_name)
# For maximum compatibility with easy_install, ensure the path