Merge pull request #177725 from dotlambda/home-assistant-parse-requirements
[staging-next] home-assistant: fix parse-requirements.py
This commit is contained in:
commit
517e6431f9
1 changed files with 1 additions and 1 deletions
|
@ -155,7 +155,7 @@ def name_to_attr_path(req: str, packages: Dict[str, Dict[str, str]]) -> Optional
|
||||||
# python(minor).(major)-(pname)-(version or unstable-date)
|
# python(minor).(major)-(pname)-(version or unstable-date)
|
||||||
# we need the version qualifier, or we'll have multiple matches
|
# we need the version qualifier, or we'll have multiple matches
|
||||||
# (e.g. pyserial and pyserial-asyncio when looking for pyserial)
|
# (e.g. pyserial and pyserial-asyncio when looking for pyserial)
|
||||||
pattern = re.compile(f"^python\\d\\.\\d-{name}-(?:\\d|unstable-.*)", re.I)
|
pattern = re.compile(f"^python\\d+\\.\\d+-{name}-(?:\\d|unstable-.*)", re.I)
|
||||||
for attr_path, package in packages.items():
|
for attr_path, package in packages.items():
|
||||||
if pattern.match(package["name"]):
|
if pattern.match(package["name"]):
|
||||||
attr_paths.append(attr_path)
|
attr_paths.append(attr_path)
|
||||||
|
|
Loading…
Reference in a new issue