Commit e7114cf3 authored by Xavier Thompson's avatar Xavier Thompson

[fix] Discard DEVELOP_DIST from available in index

The package index considers may yield dists found on its local
search_path - sys.path by default - in addition to its index_url.

This commit discards such dists as they may not be installable.
parent 297a7b0a
...@@ -481,7 +481,8 @@ class Installer(object): ...@@ -481,7 +481,8 @@ class Installer(object):
wheel = getattr(requirement, 'wheel', False) wheel = getattr(requirement, 'wheel', False)
def filter_precedence(dist): def filter_precedence(dist):
return (dist.precedence == WHL_DIST) == wheel and ( return (dist.precedence == WHL_DIST) == wheel and (
not source or dist.precedence == pkg_resources.SOURCE_DIST) not source or dist.precedence == pkg_resources.SOURCE_DIST) and (
dist.precedence != pkg_resources.DEVELOP_DIST)
index = self._index index = self._index
if not networkcache_failed: if not networkcache_failed:
......
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