mirror of
https://github.com/basnijholt/adaptive-lighting.git
synced 2026-09-27 04:14:47 +02:00
Try to copy over files
This commit is contained in:
parent
da1e52142d
commit
b9ff3d6f9a
5 changed files with 42 additions and 11 deletions
27
test_dependencies.py
Normal file
27
test_dependencies.py
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
from collections import defaultdict
|
||||
|
||||
with open("core/requirements_test_all.txt") as f:
|
||||
lines = f.readlines()
|
||||
|
||||
components = []
|
||||
packages = []
|
||||
deps = {}
|
||||
for i, line in enumerate(lines):
|
||||
line = line.strip()
|
||||
if line.startswith("# homeassistant."):
|
||||
component = line.split("# homeassistant.")[1]
|
||||
components.append(component)
|
||||
elif components and line:
|
||||
packages.append(line)
|
||||
else:
|
||||
for component in components:
|
||||
for package in packages:
|
||||
deps.setdefault(component, []).append(package)
|
||||
components = []
|
||||
packages = []
|
||||
|
||||
required = ["components.recorder", "components.mqtt", "components.zeroconf"]
|
||||
to_install = []
|
||||
for r in required:
|
||||
to_install.extend(deps[r])
|
||||
print(" ".join(to_install))
|
||||
Loading…
Add table
Add a link
Reference in a new issue