Commit 998cf56a authored by Julien Muchembled's avatar Julien Muchembled Committed by Xavier Thompson

[fix] Do not install entry points if there's any missing extra

parent bd139fa5
...@@ -1182,10 +1182,12 @@ def scripts(reqs, working_set, executable, dest=None, ...@@ -1182,10 +1182,12 @@ def scripts(reqs, working_set, executable, dest=None,
req = pkg_resources.Requirement.parse(req) req = pkg_resources.Requirement.parse(req)
if req.marker and not req.marker.evaluate(): if req.marker and not req.marker.evaluate():
continue continue
has_extras = set(req.extras).issuperset
dist = working_set.find(req) dist = working_set.find(req)
# regular console_scripts entry points # regular console_scripts entry points
for name in pkg_resources.get_entry_map(dist, 'console_scripts'): for name in pkg_resources.get_entry_map(dist, 'console_scripts'):
entry_point = dist.get_entry_info('console_scripts', name) entry_point = dist.get_entry_info('console_scripts', name)
if has_extras(entry_point.extras):
entry_points.append( entry_points.append(
(name, entry_point.module_name, (name, entry_point.module_name,
'.'.join(entry_point.attrs)) '.'.join(entry_point.attrs))
......
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