mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Fix gen_requirements_all.py script for Windows. (#6547)
This commit is contained in:
parent
5be58bd056
commit
fc46a24996
@ -30,6 +30,10 @@ IGNORE_PACKAGES = (
|
|||||||
|
|
||||||
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 = (
|
||||||
|
'colorama<=1', # Windows only requirement in check_config
|
||||||
|
)
|
||||||
|
|
||||||
URL_PIN = ('https://home-assistant.io/developers/code_review_platform/'
|
URL_PIN = ('https://home-assistant.io/developers/code_review_platform/'
|
||||||
'#1-requirements')
|
'#1-requirements')
|
||||||
|
|
||||||
@ -85,6 +89,8 @@ def gather_modules():
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
for req in module.REQUIREMENTS:
|
for req in module.REQUIREMENTS:
|
||||||
|
if req in IGNORE_REQ:
|
||||||
|
continue
|
||||||
if req.partition('==')[1] == '' and req not in IGNORE_PIN:
|
if req.partition('==')[1] == '' and req not in IGNORE_PIN:
|
||||||
errors.append(
|
errors.append(
|
||||||
"{}[Please pin requirement {}, see {}]".format(
|
"{}[Please pin requirement {}, see {}]".format(
|
||||||
@ -120,7 +126,7 @@ def gather_modules():
|
|||||||
|
|
||||||
def write_file(data):
|
def write_file(data):
|
||||||
"""Write the modules to the requirements_all.txt."""
|
"""Write the modules to the requirements_all.txt."""
|
||||||
with open('requirements_all.txt', 'w+') as req_file:
|
with open('requirements_all.txt', 'w+', newline="\n") as req_file:
|
||||||
req_file.write(data)
|
req_file.write(data)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user