diff options
-rwxr-xr-x | setuptools/package_index.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/setuptools/package_index.py b/setuptools/package_index.py index b7247120..89eb5786 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -602,9 +602,8 @@ class PackageIndex(Environment): continue if dist in req and (dist.precedence <= SOURCE_DIST or not source): - mylocation = self.download(dist.location, tmpdir) - if os.path.exists(mylocation): - dist._location = mylocation + dist.download_location = self.download(dist.location, tmpdir) + if os.path.exists(dist.download_location): return dist if force_scan: @@ -632,7 +631,7 @@ class PackageIndex(Environment): ) else: self.info("Best match: %s", dist) - return dist.clone(location=dist._location) + return dist.clone(location=dist.download_location) def fetch(self, requirement, tmpdir, force_scan=False, source=False): """Obtain a file suitable for fulfilling `requirement` |