diff --git a/script/gen_requirements_all.py b/script/gen_requirements_all.py index 2d2c6bd7563..a9a68d09491 100755 --- a/script/gen_requirements_all.py +++ b/script/gen_requirements_all.py @@ -5,6 +5,7 @@ import os import pkgutil import re import sys +import fnmatch COMMENT_REQUIREMENTS = ( 'RPi.GPIO', @@ -93,12 +94,7 @@ TEST_REQUIREMENTS = ( IGNORE_PACKAGES = ( 'homeassistant.components.recorder.models', - 'homeassistant.components.homekit.accessories', - 'homeassistant.components.homekit.covers', - 'homeassistant.components.homekit.security_systems', - 'homeassistant.components.homekit.sensors', - 'homeassistant.components.homekit.switches', - 'homeassistant.components.homekit.thermostats' + 'homeassistant.components.homekit.*' ) IGNORE_PIN = ('colorlog>2.1,<3', 'keyring>=9.3,<10.0', 'urllib3') @@ -164,7 +160,10 @@ def gather_modules(): try: module = importlib.import_module(package) except ImportError: - if package not in IGNORE_PACKAGES: + for pattern in IGNORE_PACKAGES: + if fnmatch.fnmatch(package, pattern): + break + else: errors.append(package) continue