From a0493e6ac40ddf7f55665d7368a8b82cfd716270 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 1 Aug 2022 19:48:27 +0300 Subject: [PATCH] Handle both extra IDE data: IDE_EXTRA_DATA & INTEGRATION_EXTRA_DATA --- platformio/builder/main.py | 1 - platformio/builder/tools/piointegration.py | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/platformio/builder/main.py b/platformio/builder/main.py index 730af43a..07958308 100644 --- a/platformio/builder/main.py +++ b/platformio/builder/main.py @@ -82,7 +82,6 @@ DEFAULT_ENV_OPTIONS = dict( PROGPATH=os.path.join("$BUILD_DIR", "$PROGNAME$PROGSUFFIX"), PROG_PATH="$PROGPATH", # deprecated PYTHONEXE=get_pythonexe_path(), - IDE_EXTRA_DATA={}, ) # Declare command verbose messages diff --git a/platformio/builder/tools/piointegration.py b/platformio/builder/tools/piointegration.py index ae8ee2ed..acdc66f3 100644 --- a/platformio/builder/tools/piointegration.py +++ b/platformio/builder/tools/piointegration.py @@ -175,9 +175,8 @@ def DumpIntegrationData(*args): ] ), } - data["extra"].update( - globalenv.get("INTEGRATION_EXTRA_DATA", globalenv.get("IDE_EXTRA_DATA", {})) - ) + for key in ("IDE_EXTRA_DATA", "INTEGRATION_EXTRA_DATA"): + data["extra"].update(globalenv.get(key, {})) return data @@ -186,6 +185,7 @@ def exists(_): def generate(env): + env["INTEGRATION_EXTRA_DATA"] = {} env.AddMethod(IsIntegrationDump) env.AddMethod(DumpIntegrationIncludes) env.AddMethod(DumpIntegrationData)