aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGES.txt2
-rw-r--r--distribute.egg-info/entry_points.txt2
-rwxr-xr-xsetuptools/command/easy_install.py3
-rwxr-xr-xsetuptools/package_index.py15
-rw-r--r--setuptools/tests/server.py7
5 files changed, 22 insertions, 7 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index f62356e7..93381aad 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -8,6 +8,8 @@ CHANGES
* Issue 170: Fixed unittest failure. Thanks to Toshio.
* Issue 171: Fixed race condition in unittests cause deadlocks in test suite.
+* Issue 143: Fixed a lookup issue with easy_install.
+ Thanks to David and Zooko.
------
0.6.13
diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt
index 0ee58646..1c9f123d 100644
--- a/distribute.egg-info/entry_points.txt
+++ b/distribute.egg-info/entry_points.txt
@@ -32,7 +32,7 @@ depends.txt = setuptools.command.egg_info:warn_depends_obsolete
[console_scripts]
easy_install = setuptools.command.easy_install:main
-easy_install-2.5 = setuptools.command.easy_install:main
+easy_install-2.6 = setuptools.command.easy_install:main
[setuptools.file_finders]
svn_cvs = setuptools.command.sdist:_default_revctrl
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
index a41841b3..2a227196 100755
--- a/setuptools/command/easy_install.py
+++ b/setuptools/command/easy_install.py
@@ -565,7 +565,8 @@ Please make the appropriate changes for your system and try again.
self.check_editable(spec)
dist = self.package_index.fetch_distribution(
- spec, tmpdir, self.upgrade, self.editable, not self.always_copy
+ spec, tmpdir, self.upgrade, self.editable, not self.always_copy,
+ self.local_index
)
if dist is None:
diff --git a/setuptools/package_index.py b/setuptools/package_index.py
index ba43cfbf..1d467f78 100755
--- a/setuptools/package_index.py
+++ b/setuptools/package_index.py
@@ -418,7 +418,8 @@ class PackageIndex(Environment):
def fetch_distribution(self,
- requirement, tmpdir, force_scan=False, source=False, develop_ok=False
+ requirement, tmpdir, force_scan=False, source=False, develop_ok=False,
+ local_index=None
):
"""Obtain a distribution suitable for fulfilling `requirement`
@@ -440,11 +441,14 @@ class PackageIndex(Environment):
# process a Requirement
self.info("Searching for %s", requirement)
skipped = {}
+ dist = None
- def find(req):
+ def find(req, env=None):
+ if env is None:
+ env = self
# Find a matching distribution; may be called more than once
- for dist in self[req.key]:
+ for dist in env[req.key]:
if dist.precedence==DEVELOP_DIST and not develop_ok:
if dist not in skipped:
@@ -461,8 +465,11 @@ class PackageIndex(Environment):
if force_scan:
self.prescan()
self.find_packages(requirement)
+ dist = find(requirement)
+
+ if local_index is not None:
+ dist = dist or find(requirement, local_index)
- dist = find(requirement)
if dist is None and self.to_scan is not None:
self.prescan()
dist = find(requirement)
diff --git a/setuptools/tests/server.py b/setuptools/tests/server.py
index f116a3fd..f4aaaa1c 100644
--- a/setuptools/tests/server.py
+++ b/setuptools/tests/server.py
@@ -1,6 +1,7 @@
"""Basic http server for tests to simulate PyPI or custom indexes
"""
import urllib2
+import sys
from threading import Thread
from BaseHTTPServer import HTTPServer
from SimpleHTTPServer import SimpleHTTPRequestHandler
@@ -33,7 +34,11 @@ class IndexServer(HTTPServer):
"""self.shutdown is not supported on python < 2.6"""
self._run = False
try:
- urllib2.urlopen('http://127.0.0.1:%s/' % self.server_port, None, 5)
+ if sys.version > '2.6':
+ urllib2.urlopen('http://127.0.0.1:%s/' % self.server_port,
+ None, 5)
+ else:
+ urllib2.urlopen('http://127.0.0.1:%s/' % self.server_port)
except urllib2.URLError:
pass
self.thread.join()