packages: updated package details with location info.
marcink -
r4348:a10871a5 default
Not Reviewed
Show More
Add another comment
TODOs: 0 unresolved 0 Resolved
COMMENTS: 0 General 0 Inline
@@ -143,8 +143,9 def python_info():
143
143
144
144
145 def py_modules():
145 def py_modules():
146 mods = dict([(p.project_name, p.version)
146 mods = dict([(p.project_name, {'version': p.version, 'location': p.location})
147 for p in pkg_resources.working_set])
147 for p in pkg_resources.working_set])
148
148 value = sorted(mods.items(), key=lambda k: k[0].lower())
149 value = sorted(mods.items(), key=lambda k: k[0].lower())
149 return SysInfoRes(value=value)
150 return SysInfoRes(value=value)
150
151
@@ -46,12 +46,19
46 <h3 class="panel-title">${_('Python Packages')}</h3>
46 <h3 class="panel-title">${_('Python Packages')}</h3>
47 </div>
47 </div>
48 <div class="panel-body">
48 <div class="panel-body">
49 <dl class="dl-horizontal settings dt-400">
49 <table>
50 % for dt, dd in c.py_modules['human_value']:
50 <th></th>
51 <dt>${dt}${':' if dt else '---'}</dt>
51 <th></th>
52 <dd>${dd}${'' if dt else '---'}</dd>
52 <th></th>
53 % endfor
53 % for name, package_data in c.py_modules['human_value']:
54 </dl>
54 <tr>
55 <td>${name.lower()}</td>
56 <td>${package_data['version']}</td>
57 <td>(${package_data['location']})</td>
58 </tr>
59 % endfor
60 </table>
61
55 </div>
62 </div>
56 </div>
63 </div>
57
64
@@ -40,8 +40,8 SYSTEM SETTINGS
40 PYTHON PACKAGES
40 PYTHON PACKAGES
41 ---------------
41 ---------------
42
42
43 % for key, value in c.py_modules['human_value']:
43 % for name, package_data in c.py_modules['human_value']:
44 ${'{:<60}'.format(key)}: ${value}
44 ${'{:<60}'.format(name)}: ${'{:<20}'.format(package_data['version'])} (${package_data['location']})
45 % endfor
45 % endfor
46
46
47 </pre>
47 </pre>
Comments 0
You need to be logged in to leave comments. Login now