1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-22 21:22:22 +01:00

Support library override using named library with repository (#2056)

This commit is contained in:
Stefan Agner
2021-07-26 10:50:45 +02:00
committed by GitHub
parent c2637a76f7
commit 159744e09e
4 changed files with 53 additions and 12 deletions

View File

@@ -332,6 +332,14 @@ async def to_code(config):
if "@" in lib:
name, vers = lib.split("@", 1)
cg.add_library(name, vers)
elif "://" in lib:
# Repository...
if "=" in lib:
name, repo = lib.split("=", 1)
cg.add_library(name, None, repo)
else:
cg.add_library(None, None, lib)
else:
cg.add_library(lib, None)