aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/package_index.py
diff options
context:
space:
mode:
authorJens Timmerman <jens.timmerman@ugent.be>2016-06-24 17:25:02 +0200
committerJens Timmerman <jens.timmerman@ugent.be>2016-07-25 16:14:52 +0200
commitc4ef24f6bac7b4c12b3cfc71258524185d220fc7 (patch)
tree007302dbac4aa6f97694d2b90c94ce525c742d18 /setuptools/package_index.py
parent1e5bb5e680d00fcfc74078d0ea2d12760879b3c7 (diff)
downloadexternal_python_setuptools-c4ef24f6bac7b4c12b3cfc71258524185d220fc7.tar.gz
external_python_setuptools-c4ef24f6bac7b4c12b3cfc71258524185d220fc7.tar.bz2
external_python_setuptools-c4ef24f6bac7b4c12b3cfc71258524185d220fc7.zip
don't return a tuple, add a new attribute to current returnvalue
Diffstat (limited to 'setuptools/package_index.py')
-rwxr-xr-xsetuptools/package_index.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/setuptools/package_index.py b/setuptools/package_index.py
index a6918123..b7247120 100755
--- a/setuptools/package_index.py
+++ b/setuptools/package_index.py
@@ -604,25 +604,25 @@ class PackageIndex(Environment):
if dist in req and (dist.precedence <= SOURCE_DIST or not source):
mylocation = self.download(dist.location, tmpdir)
if os.path.exists(mylocation):
- return dist, mylocation
- return None, None
+ dist._location = mylocation
+ return dist
if force_scan:
self.prescan()
self.find_packages(requirement)
- dist, mylocation = find(requirement)
+ dist = find(requirement)
if not dist and local_index is not None:
- dist, mylocation = find(requirement, local_index)
+ dist = find(requirement, local_index)
if dist is None:
if self.to_scan is not None:
self.prescan()
- dist, mylocation = find(requirement)
+ dist = find(requirement)
if dist is None and not force_scan:
self.find_packages(requirement)
- dist, mylocation = find(requirement)
+ dist = find(requirement)
if dist is None:
self.warn(
@@ -632,7 +632,7 @@ class PackageIndex(Environment):
)
else:
self.info("Best match: %s", dist)
- return dist.clone(location=mylocation)
+ return dist.clone(location=dist._location)
def fetch(self, requirement, tmpdir, force_scan=False, source=False):
"""Obtain a file suitable for fulfilling `requirement`