mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2026-07-28 00:32:42 -04:00
Added platform and runtime information to info plugin
This commit is contained in:
@@ -130,12 +130,27 @@ class InfoPlugin(BasePlugin[InfoPluginConfig]):
|
||||
|
||||
# Add dependency tree as returned by pipdeptree
|
||||
f.writestr(
|
||||
os.path.join(archive_name, "dependencies.json"),
|
||||
os.path.join(archive_name, ".dependencies.json"),
|
||||
render_json_tree(PackageDAG.from_pkgs(
|
||||
get_installed_distributions(local_only = True)
|
||||
), 2)
|
||||
)
|
||||
|
||||
# Add version information
|
||||
mkdocs = get_distribution("mkdocs")
|
||||
f.writestr(
|
||||
os.path.join(archive_name, ".versions.log"),
|
||||
"\n".join([
|
||||
f"-----------------------------------",
|
||||
f" Material for MkDocs: {version}",
|
||||
f" MkDocs: {mkdocs.version}",
|
||||
f"-----------------------------------",
|
||||
f" Platform: {platform.system()}",
|
||||
f" Python: {platform.python_version()}",
|
||||
f"-----------------------------------"
|
||||
])
|
||||
)
|
||||
|
||||
# Retrieve list of processed files
|
||||
for a in f.filelist:
|
||||
files.append("".join([
|
||||
|
||||
Reference in New Issue
Block a user