mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 09:47:13 +00:00
Install requirements for integrations in packages before importing them. (#25005)
* Process requirements for integrations in packages before loading * trigger buld
This commit is contained in:
parent
0595fc3097
commit
df4caf41d0
@ -30,6 +30,7 @@ from homeassistant.exceptions import HomeAssistantError
|
||||
from homeassistant.loader import (
|
||||
Integration, async_get_integration, IntegrationNotFound
|
||||
)
|
||||
from homeassistant.requirements import async_process_requirements
|
||||
from homeassistant.util.yaml import load_yaml, SECRET_YAML
|
||||
from homeassistant.util.package import is_docker_env
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
@ -593,6 +594,13 @@ async def merge_packages_config(hass: HomeAssistant, config: Dict,
|
||||
_log_pkg_error(pack_name, comp_name, config, "does not exist")
|
||||
continue
|
||||
|
||||
if (not hass.config.skip_pip and integration.requirements and
|
||||
not await async_process_requirements(
|
||||
hass, integration.domain, integration.requirements)):
|
||||
_log_pkg_error(pack_name, comp_name, config,
|
||||
"unable to install all requirements")
|
||||
continue
|
||||
|
||||
try:
|
||||
component = integration.get_component()
|
||||
except ImportError:
|
||||
|
Loading…
x
Reference in New Issue
Block a user