mirror of https://github.com/pypa/pip
Follow pattern where field is set if value exists
This commit is contained in:
parent
e32d7430f0
commit
8e9fca27d8
|
@ -86,13 +86,11 @@ def search_packages_info(query):
|
|||
entry_points = dist.get_metadata_lines('entry_points.txt')
|
||||
package['entry_points'] = entry_points
|
||||
|
||||
installer = None
|
||||
if dist.has_metadata('INSTALLER'):
|
||||
for line in dist.get_metadata_lines('INSTALLER'):
|
||||
if line.strip():
|
||||
installer = line.strip()
|
||||
package['installer'] = line.strip()
|
||||
break
|
||||
package['installer'] = installer
|
||||
|
||||
# @todo: Should pkg_resources.Distribution have a
|
||||
# `get_pkg_info` method?
|
||||
|
|
Loading…
Reference in New Issue