Simplify entity components requirements in hassfest docker (#159914)

This commit is contained in:
Artur Pragacz
2025-12-29 10:50:20 +01:00
committed by GitHub
parent 8aa897b090
commit dc119d47c5
2 changed files with 9 additions and 33 deletions

View File

@@ -4,9 +4,7 @@ from dataclasses import dataclass
from pathlib import Path
from homeassistant import core
from homeassistant.const import Platform
from homeassistant.util import executor, thread
from script.gen_requirements_all import gather_recursive_requirements
from .model import Config, Integration
from .requirements import PACKAGE_REGEX, PIP_VERSION_RANGE_SEPARATOR
@@ -108,8 +106,7 @@ RUN --mount=from=ghcr.io/astral-sh/uv:{uv},source=/uv,target=/bin/uv \
stdlib-list==0.10.0 \
pipdeptree=={pipdeptree} \
tqdm=={tqdm} \
ruff=={ruff} \
{required_components_packages}
ruff=={ruff}
LABEL "name"="hassfest"
LABEL "maintainer"="Home Assistant <hello@home-assistant.io>"
@@ -159,26 +156,6 @@ class File:
path: Path
def _generate_hassfest_dockerimage(
config: Config, timeout: int, package_versions: dict[str, str]
) -> File:
packages = set()
already_checked_domains = set()
for platform in Platform:
packages.update(
gather_recursive_requirements(platform.value, already_checked_domains)
)
return File(
_HASSFEST_TEMPLATE.format(
timeout=timeout,
required_components_packages=" \\\n ".join(sorted(packages)),
**package_versions,
),
config.root / "script/hassfest/docker/Dockerfile",
)
def _generate_files(config: Config) -> list[File]:
timeout = (
core.STOPPING_STAGE_SHUTDOWN_TIMEOUT
@@ -207,7 +184,13 @@ def _generate_files(config: Config) -> list[File]:
),
config.root / "Dockerfile",
),
_generate_hassfest_dockerimage(config, timeout, package_versions),
File(
_HASSFEST_TEMPLATE.format(
timeout=timeout,
**package_versions,
),
config.root / "script/hassfest/docker/Dockerfile",
),
]

View File

@@ -27,14 +27,7 @@ RUN --mount=from=ghcr.io/astral-sh/uv:0.9.17,source=/uv,target=/bin/uv \
stdlib-list==0.10.0 \
pipdeptree==2.26.1 \
tqdm==4.67.1 \
ruff==0.13.0 \
PyTurboJPEG==1.8.0 \
ha-ffmpeg==3.2.2 \
hassil==3.5.0 \
home-assistant-intents==2025.12.2 \
mutagen==1.47.0 \
pysilero-vad==3.0.1 \
pyspeex-noise==1.0.2
ruff==0.13.0
LABEL "name"="hassfest"
LABEL "maintainer"="Home Assistant <hello@home-assistant.io>"