mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Constrain core dependencies to core versions (#6738)
* Require at least pip 7.1 * Write and use constraint files for packages * Update gen_requirements_all.py
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
import asyncio
|
||||
import logging
|
||||
import logging.handlers
|
||||
import os
|
||||
|
||||
from types import ModuleType
|
||||
from typing import Optional, Dict
|
||||
@@ -12,7 +13,8 @@ import homeassistant.core as core
|
||||
import homeassistant.loader as loader
|
||||
import homeassistant.util.package as pkg_util
|
||||
from homeassistant.util.async import run_coroutine_threadsafe
|
||||
from homeassistant.const import EVENT_COMPONENT_LOADED, PLATFORM_FORMAT
|
||||
from homeassistant.const import (
|
||||
EVENT_COMPONENT_LOADED, PLATFORM_FORMAT, CONSTRAINT_FILE)
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
@@ -74,7 +76,10 @@ def _async_process_requirements(hass: core.HomeAssistant, name: str,
|
||||
|
||||
def pip_install(mod):
|
||||
"""Install packages."""
|
||||
return pkg_util.install_package(mod, target=hass.config.path('deps'))
|
||||
return pkg_util.install_package(
|
||||
mod, target=hass.config.path('deps'),
|
||||
constraints=os.path.join(os.path.dirname(__file__),
|
||||
CONSTRAINT_FILE))
|
||||
|
||||
with (yield from pip_lock):
|
||||
for req in requirements:
|
||||
|
||||
Reference in New Issue
Block a user