Merge pull request #126930 from dotlambda/home-assistant-missing-requirements
This commit is contained in:
commit
93106a15f8
1 changed files with 7 additions and 4 deletions
|
@ -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
|
||||
|
@ -187,10 +188,6 @@ def main() -> None:
|
|||
missing_reqs.append(name)
|
||||
else:
|
||||
build_inputs[component] = (attr_paths, missing_reqs)
|
||||
n_diff = len(reqs) > len(build_inputs[component])
|
||||
if n_diff > 0:
|
||||
print("Component {} is missing {} dependencies".format(component, n_diff))
|
||||
print("missing requirements: {}".format(missing_reqs))
|
||||
|
||||
with open(os.path.dirname(sys.argv[0]) + "/component-packages.nix", "w") as f:
|
||||
f.write("# Generated by parse-requirements.py\n")
|
||||
|
@ -210,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")
|
||||
|
|
Loading…
Reference in a new issue