# HG changeset patch # User Marcin Kuzminski # Date 2020-05-19 10:24:38 # Node ID a10871a5b390b9e94fd902303ec6e5324456496f # Parent 6b62737bd4d668ead01090103086f122fc5c6f8e packages: updated package details with location info. diff --git a/rhodecode/lib/system_info.py b/rhodecode/lib/system_info.py --- a/rhodecode/lib/system_info.py +++ b/rhodecode/lib/system_info.py @@ -143,8 +143,9 @@ def python_info(): 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]) + value = sorted(mods.items(), key=lambda k: k[0].lower()) return SysInfoRes(value=value) diff --git a/rhodecode/templates/admin/settings/settings_system.mako b/rhodecode/templates/admin/settings/settings_system.mako --- a/rhodecode/templates/admin/settings/settings_system.mako +++ b/rhodecode/templates/admin/settings/settings_system.mako @@ -46,12 +46,19 @@

${_('Python Packages')}

-
- % for dt, dd in c.py_modules['human_value']: -
${dt}${':' if dt else '---'}
-
${dd}${'' if dt else '---'}
- % endfor -
+ + + + + % for name, package_data in c.py_modules['human_value']: + + + + + + % endfor +
${name.lower()}${package_data['version']}(${package_data['location']})
+
diff --git a/rhodecode/templates/admin/settings/settings_system_snapshot.mako b/rhodecode/templates/admin/settings/settings_system_snapshot.mako --- a/rhodecode/templates/admin/settings/settings_system_snapshot.mako +++ b/rhodecode/templates/admin/settings/settings_system_snapshot.mako @@ -40,8 +40,8 @@ SYSTEM SETTINGS PYTHON PACKAGES --------------- -% for key, value in c.py_modules['human_value']: -${'{:<60}'.format(key)}: ${value} +% for name, package_data in c.py_modules['human_value']: +${'{:<60}'.format(name)}: ${'{:<20}'.format(package_data['version'])} (${package_data['location']}) % endfor