Commit 5fb7fba3 authored by Julien Muchembled's avatar Julien Muchembled

fixup! easy_install: add slapos.libnetworkcache support

This fixes filtering of distributions, like py_version for EGG_DIST.

See commit fb785cb3.
parent 53cbfcf1
...@@ -485,12 +485,17 @@ class Installer: ...@@ -485,12 +485,17 @@ class Installer:
with nc: with nc:
for entry in nc.select(key): for entry in nc.select(key):
basename = entry['basename'] basename = entry['basename']
dist = next(iter(distros_for_location( for dist in distros_for_location(
entry['sha512'], basename))) entry['sha512'], basename):
if filter_precedence(dist): # The version comparison is to keep
dist.networkcache = ( # the one that's correctly parsed by
basename, requirement, source) # distros_for_location.
dists.append(dist) if (dist.version == version and
self._env.can_add(dist) and
filter_precedence(dist)):
dist.networkcache = (
basename, requirement, source)
dists.append(dist)
if dists: if dists:
return max(dists) return max(dists)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment