packages: updated package details with location info.
This commit is contained in:
parent
159aca46c7
commit
ddd8fcad75
3 changed files with 17 additions and 9 deletions
|
|
@ -143,8 +143,9 @@ def python_info():
|
||||||
|
|
||||||
|
|
||||||
def py_modules():
|
def py_modules():
|
||||||
mods = dict([(p.project_name, p.version)
|
mods = dict([(p.project_name, {'version': p.version, 'location': p.location})
|
||||||
for p in pkg_resources.working_set])
|
for p in pkg_resources.working_set])
|
||||||
|
|
||||||
value = sorted(mods.items(), key=lambda k: k[0].lower())
|
value = sorted(mods.items(), key=lambda k: k[0].lower())
|
||||||
return SysInfoRes(value=value)
|
return SysInfoRes(value=value)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -46,12 +46,19 @@
|
||||||
<h3 class="panel-title">${_('Python Packages')}</h3>
|
<h3 class="panel-title">${_('Python Packages')}</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<dl class="dl-horizontal settings dt-400">
|
<table>
|
||||||
% for dt, dd in c.py_modules['human_value']:
|
<th></th>
|
||||||
<dt>${dt}${':' if dt else '---'}</dt>
|
<th></th>
|
||||||
<dd>${dd}${'' if dt else '---'}</dd>
|
<th></th>
|
||||||
% endfor
|
% for name, package_data in c.py_modules['human_value']:
|
||||||
</dl>
|
<tr>
|
||||||
|
<td>${name.lower()}</td>
|
||||||
|
<td>${package_data['version']}</td>
|
||||||
|
<td>(${package_data['location']})</td>
|
||||||
|
</tr>
|
||||||
|
% endfor
|
||||||
|
</table>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -40,8 +40,8 @@ ${value}
|
||||||
PYTHON PACKAGES
|
PYTHON PACKAGES
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
% for key, value in c.py_modules['human_value']:
|
% for name, package_data in c.py_modules['human_value']:
|
||||||
${'{:<60}'.format(key)}: ${value}
|
${'{:<60}'.format(name)}: ${'{:<20}'.format(package_data['version'])} (${package_data['location']})
|
||||||
% endfor
|
% endfor
|
||||||
|
|
||||||
</pre>
|
</pre>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue