From b0712c4186f962f972a4bc08ebac5da45f1a719e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Thu, 29 Sep 2022 21:23:01 +0200 Subject: [PATCH] make other platforms happy again --- bin/platformio-custom.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/platformio-custom.py b/bin/platformio-custom.py index de9ce120..e03a35e3 100644 --- a/bin/platformio-custom.py +++ b/bin/platformio-custom.py @@ -7,8 +7,6 @@ from readprops import readProps Import("env") platform = env.PioPlatform() -sys.path.append(join(platform.get_package_dir("tool-esptoolpy"))) -import esptool def esp32_create_combined_bin(source, target, env): # this sub is borrowed from ESPEasy build toolchain. It's licensed under GPL V3 @@ -57,7 +55,10 @@ def esp32_create_combined_bin(source, target, env): esptool.main(cmd) -env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", esp32_create_combined_bin) +if (platform.name == "espressif32"): + sys.path.append(join(platform.get_package_dir("tool-esptoolpy"))) + import esptool + env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", esp32_create_combined_bin) Import("projenv")