mirror of
https://github.com/esphome/esphome.git
synced 2024-11-09 16:57:47 +01:00
libretiny: Allow specifying version of explicitly imported sources (#7408)
This commit is contained in:
parent
9722876ef6
commit
32995a352b
1 changed files with 4 additions and 8 deletions
|
@ -1,10 +1,6 @@
|
|||
import json
|
||||
import logging
|
||||
from os.path import (
|
||||
dirname,
|
||||
isfile,
|
||||
join,
|
||||
)
|
||||
from os.path import dirname, isfile, join
|
||||
|
||||
import esphome.codegen as cg
|
||||
import esphome.config_validation as cv
|
||||
|
@ -282,10 +278,10 @@ async def component_to_code(config):
|
|||
# if platform version is a valid version constraint, prefix the default package
|
||||
framework = config[CONF_FRAMEWORK]
|
||||
cv.platformio_version_constraint(framework[CONF_VERSION])
|
||||
if str(framework[CONF_VERSION]) != "0.0.0":
|
||||
cg.add_platformio_option("platform", f"libretiny @ {framework[CONF_VERSION]}")
|
||||
elif framework[CONF_SOURCE]:
|
||||
if framework[CONF_SOURCE]:
|
||||
cg.add_platformio_option("platform", framework[CONF_SOURCE])
|
||||
elif str(framework[CONF_VERSION]) != "0.0.0":
|
||||
cg.add_platformio_option("platform", f"libretiny @ {framework[CONF_VERSION]}")
|
||||
else:
|
||||
cg.add_platformio_option("platform", "libretiny")
|
||||
|
||||
|
|
Loading…
Reference in a new issue