homeassistant: add package substitute for feedparser

This commit is contained in:
Jörg Thalheim 2020-06-22 11:51:00 +01:00
parent 8420dc923e
commit ce025026ac
No known key found for this signature in database
GPG Key ID: 003F2096411B5F92
2 changed files with 7 additions and 1 deletions

View File

@ -243,7 +243,7 @@
"familyhub" = ps: with ps; [ ]; # missing inputs: python-family-hub-local
"fan" = ps: with ps; [ ];
"fastdotcom" = ps: with ps; [ ]; # missing inputs: fastdotcom
"feedreader" = ps: with ps; [ ]; # missing inputs: feedparser-homeassistant
"feedreader" = ps: with ps; [ feedparser];
"ffmpeg" = ps: with ps; [ ha-ffmpeg ];
"ffmpeg_motion" = ps: with ps; [ ha-ffmpeg ];
"ffmpeg_noise" = ps: with ps; [ ha-ffmpeg ];

View File

@ -41,6 +41,10 @@ PKG_PREFERENCES = {
"tensorflow-build_2": "tensorflow",
}
# packages we have a different name for or we want to replace
PKG_SUBSTITUTES = {
"feedparser-homeassistant": "feedparser"
}
def run_mypy() -> None:
cmd = ["mypy", "--ignore-missing-imports", __file__]
@ -156,6 +160,8 @@ def main() -> None:
# Therefore, if there's a "#" in the line, only take the part after it
req = req[req.find("#") + 1 :]
name = req.split("==")[0]
name = PKG_SUBSTITUTES.get(name, name)
attr_path = name_to_attr_path(name, packages)
if attr_path is not None:
# Add attribute path without "python3Packages." prefix