Allow disabling integrations in manifest, block uuid package being installed and disable ezviz (#38444)
This commit is contained in:
@@ -71,6 +71,9 @@ enum34==1000000000.0.0
|
||||
|
||||
# This is a old unmaintained library and is replaced with pycryptodome
|
||||
pycrypto==1000000000.0.0
|
||||
|
||||
# This is built-in and breaks pip if installed
|
||||
uuid==1000000000.0.0
|
||||
"""
|
||||
|
||||
IGNORE_PRE_COMMIT_HOOK_ID = (
|
||||
@@ -178,6 +181,9 @@ def gather_requirements_from_manifests(errors, reqs):
|
||||
errors.append(f"The manifest for integration {domain} is invalid.")
|
||||
continue
|
||||
|
||||
if integration.disabled:
|
||||
continue
|
||||
|
||||
process_requirements(
|
||||
errors, integration.requirements, f"homeassistant.components.{domain}", reqs
|
||||
)
|
||||
|
||||
@@ -54,6 +54,7 @@ MANIFEST_SCHEMA = vol.Schema(
|
||||
vol.Optional("dependencies"): [str],
|
||||
vol.Optional("after_dependencies"): [str],
|
||||
vol.Required("codeowners"): [str],
|
||||
vol.Optional("disabled"): str,
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
@@ -73,6 +73,11 @@ class Integration:
|
||||
"""Integration domain."""
|
||||
return self.path.name
|
||||
|
||||
@property
|
||||
def disabled(self) -> Optional[str]:
|
||||
"""List of disabled."""
|
||||
return self.manifest.get("disabled")
|
||||
|
||||
@property
|
||||
def requirements(self) -> List[str]:
|
||||
"""List of requirements."""
|
||||
|
||||
Reference in New Issue
Block a user