3
0
Fork 0
forked from mirrors/nixpkgs

home-assistant: make parse-requirements.py print the percentage of supported components

This commit is contained in:
Robert Schütz 2021-06-15 12:52:48 +02:00
parent 9b51b47902
commit 0773125628

View file

@ -23,6 +23,7 @@ import subprocess
import sys
import tarfile
import tempfile
from functools import reduce
from io import BytesIO
from typing import Dict, Optional, Set, Any
from urllib.request import urlopen
@ -206,6 +207,12 @@ def main() -> None:
f.write(" };\n")
f.write("}\n")
supported_components = reduce(lambda n, c: n + (build_inputs[c][1] == []),
components.keys(), 0)
total_components = len(components)
print(f"{supported_components} / {total_components} components supported, "
f"i.e. {supported_components / total_components:.2%}")
if outdated:
table = Table(title="Outdated dependencies")
table.add_column("Package")