1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-15 01:32:19 +01:00

Fixed PlatformIO Build on DEV (#4422)

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
Expaso
2023-02-13 03:43:52 +01:00
committed by GitHub
parent 78f5c417a4
commit 7a2d7fdd19
8 changed files with 32 additions and 12 deletions

View File

@@ -1,15 +1,25 @@
# Source https://github.com/letscontrolit/ESPEasy/pull/3845#issuecomment-1005864664
import os
if os.environ.get("ESPHOME_USE_SUBPROCESS") is None:
import esptool
else:
import subprocess
from SCons.Script import ARGUMENTS
# pylint: disable=E0602
Import("env") # noqa
import os
import shutil
if os.environ.get("ESPHOME_USE_SUBPROCESS") is None:
try:
import esptool
except ImportError:
env.Execute("$PYTHONEXE -m pip install esptool")
else:
import subprocess
from SCons.Script import ARGUMENTS
# Copy over the default sdkconfig.
from os import path
if path.exists("./sdkconfig.defaults"):
os.makedirs(".temp", exist_ok=True)
shutil.copy("./sdkconfig.defaults", "./.temp/sdkconfig-esp32-idf")
def esp32_create_combined_bin(source, target, env):
verbose = bool(int(ARGUMENTS.get("PIOVERBOSE", "0")))