Add default config to constaint file (#24423)
This commit is contained in:
parent
1810e459ee
commit
168f20bdf4
2 changed files with 31 additions and 26 deletions
|
@ -1,21 +1,29 @@
|
||||||
|
PyJWT==1.7.1
|
||||||
|
PyNaCl==1.3.0
|
||||||
aiohttp==3.5.4
|
aiohttp==3.5.4
|
||||||
|
aiohttp_cors==0.7.0
|
||||||
astral==1.10.1
|
astral==1.10.1
|
||||||
async_timeout==3.0.1
|
async_timeout==3.0.1
|
||||||
attrs==19.1.0
|
attrs==19.1.0
|
||||||
bcrypt==3.1.6
|
bcrypt==3.1.6
|
||||||
certifi>=2018.04.16
|
certifi>=2018.04.16
|
||||||
|
cryptography==2.6.1
|
||||||
|
distro==1.4.0
|
||||||
|
hass-nabucasa==0.13
|
||||||
|
home-assistant-frontend==20190604.0
|
||||||
importlib-metadata==0.15
|
importlib-metadata==0.15
|
||||||
jinja2>=2.10
|
jinja2>=2.10
|
||||||
PyJWT==1.7.1
|
netdisco==2.6.0
|
||||||
cryptography==2.6.1
|
|
||||||
pip>=8.0.3
|
pip>=8.0.3
|
||||||
python-slugify==3.0.2
|
python-slugify==3.0.2
|
||||||
pytz>=2019.01
|
pytz>=2019.01
|
||||||
pyyaml>=3.13,<4
|
pyyaml>=3.13,<4
|
||||||
requests==2.22.0
|
requests==2.22.0
|
||||||
ruamel.yaml==0.15.97
|
ruamel.yaml==0.15.97
|
||||||
voluptuous==0.11.5
|
sqlalchemy==1.3.3
|
||||||
voluptuous-serialize==2.1.0
|
voluptuous-serialize==2.1.0
|
||||||
|
voluptuous==0.11.5
|
||||||
|
zeroconf==0.23.0
|
||||||
|
|
||||||
pycryptodome>=3.6.6
|
pycryptodome>=3.6.6
|
||||||
|
|
||||||
|
@ -27,7 +35,3 @@ pycrypto==1000000000.0.0
|
||||||
|
|
||||||
# Contains code to modify Home Assistant to work around our rules
|
# Contains code to modify Home Assistant to work around our rules
|
||||||
python-systemair-savecair==1000000000.0.0
|
python-systemair-savecair==1000000000.0.0
|
||||||
|
|
||||||
# Newer version causes pylint to take forever
|
|
||||||
# https://github.com/timothycrosley/isort/issues/848
|
|
||||||
isort==4.3.4
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
"""Generate an updated requirements_all.txt."""
|
"""Generate an updated requirements_all.txt."""
|
||||||
import fnmatch
|
|
||||||
import importlib
|
import importlib
|
||||||
import os
|
import os
|
||||||
import pathlib
|
import pathlib
|
||||||
|
@ -155,13 +154,6 @@ TEST_REQUIREMENTS = (
|
||||||
'bellows-homeassistant',
|
'bellows-homeassistant',
|
||||||
)
|
)
|
||||||
|
|
||||||
IGNORE_PACKAGES = (
|
|
||||||
'homeassistant.components.hangouts.hangups_utils',
|
|
||||||
'homeassistant.components.cloud.client',
|
|
||||||
'homeassistant.components.homekit.*',
|
|
||||||
'homeassistant.components.recorder.models',
|
|
||||||
)
|
|
||||||
|
|
||||||
IGNORE_PIN = ('colorlog>2.1,<3', 'keyring>=9.3,<10.0', 'urllib3')
|
IGNORE_PIN = ('colorlog>2.1,<3', 'keyring>=9.3,<10.0', 'urllib3')
|
||||||
|
|
||||||
IGNORE_REQ = (
|
IGNORE_REQ = (
|
||||||
|
@ -185,10 +177,6 @@ pycrypto==1000000000.0.0
|
||||||
|
|
||||||
# Contains code to modify Home Assistant to work around our rules
|
# Contains code to modify Home Assistant to work around our rules
|
||||||
python-systemair-savecair==1000000000.0.0
|
python-systemair-savecair==1000000000.0.0
|
||||||
|
|
||||||
# Newer version causes pylint to take forever
|
|
||||||
# https://github.com/timothycrosley/isort/issues/848
|
|
||||||
isort==4.3.4
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
@ -218,6 +206,22 @@ def core_requirements():
|
||||||
return re.findall(r"'(.*?)'", reqs_raw)
|
return re.findall(r"'(.*?)'", reqs_raw)
|
||||||
|
|
||||||
|
|
||||||
|
def gather_recursive_requirements(domain, seen=None):
|
||||||
|
"""Recursively gather requirements from a module."""
|
||||||
|
if seen is None:
|
||||||
|
seen = set()
|
||||||
|
|
||||||
|
seen.add(domain)
|
||||||
|
integration = Integration(pathlib.Path(
|
||||||
|
'homeassistant/components/{}'.format(domain)
|
||||||
|
))
|
||||||
|
integration.load_manifest()
|
||||||
|
reqs = set(integration.manifest['requirements'])
|
||||||
|
for dep_domain in integration.manifest['dependencies']:
|
||||||
|
reqs.update(gather_recursive_requirements(dep_domain, seen))
|
||||||
|
return reqs
|
||||||
|
|
||||||
|
|
||||||
def comment_requirement(req):
|
def comment_requirement(req):
|
||||||
"""Comment out requirement. Some don't install on all systems."""
|
"""Comment out requirement. Some don't install on all systems."""
|
||||||
return any(ign in req for ign in COMMENT_REQUIREMENTS)
|
return any(ign in req for ign in COMMENT_REQUIREMENTS)
|
||||||
|
@ -274,12 +278,8 @@ def gather_requirements_from_modules(errors, reqs):
|
||||||
try:
|
try:
|
||||||
module = importlib.import_module(package)
|
module = importlib.import_module(package)
|
||||||
except ImportError as err:
|
except ImportError as err:
|
||||||
for pattern in IGNORE_PACKAGES:
|
print("{}: {}".format(package.replace('.', '/') + '.py', err))
|
||||||
if fnmatch.fnmatch(package, pattern):
|
errors.append(package)
|
||||||
break
|
|
||||||
else:
|
|
||||||
print("{}: {}".format(package.replace('.', '/') + '.py', err))
|
|
||||||
errors.append(package)
|
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if getattr(module, 'REQUIREMENTS', None):
|
if getattr(module, 'REQUIREMENTS', None):
|
||||||
|
@ -347,7 +347,8 @@ def requirements_test_output(reqs):
|
||||||
|
|
||||||
def gather_constraints():
|
def gather_constraints():
|
||||||
"""Construct output for constraint file."""
|
"""Construct output for constraint file."""
|
||||||
return '\n'.join(core_requirements() + [''])
|
return '\n'.join(sorted(core_requirements() + list(
|
||||||
|
gather_recursive_requirements('default_config'))) + [''])
|
||||||
|
|
||||||
|
|
||||||
def write_requirements_file(data):
|
def write_requirements_file(data):
|
||||||
|
|
Loading…
Add table
Reference in a new issue