From aabbbef94432b2c4a788858b01856a6cea718c9b Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 10 Jan 2024 16:39:38 +0200 Subject: [PATCH 1/6] Start 6.1.13 --- HISTORY.rst | 3 +++ platformio/__init__.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/HISTORY.rst b/HISTORY.rst index 9624b244..17be25e1 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -17,6 +17,9 @@ Unlock the true potential of embedded software development with PlatformIO's collaborative ecosystem, embracing declarative principles, test-driven methodologies, and modern toolchains for unrivaled success. +6.1.13 (2024-??-??) +~~~~~~~~~~~~~~~~~~~ + 6.1.12 (2024-01-10) ~~~~~~~~~~~~~~~~~~~ diff --git a/platformio/__init__.py b/platformio/__init__.py index 0e79928a..c90ba11e 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -VERSION = (6, 1, 12) +VERSION = (6, 1, "13a1") __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" From adab425c6d9b7078d673504c091743b11c03c4be Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 11 Jan 2024 19:23:26 +0200 Subject: [PATCH 2/6] Expanded support for SCons variables declared in the legacy format ``${SCONS_VARNAME}`` // Resolve #4828 --- HISTORY.rst | 2 ++ platformio/project/config.py | 8 ++++++-- tests/project/test_config.py | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 17be25e1..7a6a93cd 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -20,6 +20,8 @@ test-driven methodologies, and modern toolchains for unrivaled success. 6.1.13 (2024-??-??) ~~~~~~~~~~~~~~~~~~~ +* Expanded support for SCons variables declared in the legacy format ``${SCONS_VARNAME}`` (`issue #4828 `_) + 6.1.12 (2024-01-10) ~~~~~~~~~~~~~~~~~~~ diff --git a/platformio/project/config.py b/platformio/project/config.py index 3d92a5ae..f138f26c 100644 --- a/platformio/project/config.py +++ b/platformio/project/config.py @@ -164,6 +164,7 @@ class ProjectConfigBase: @staticmethod def get_section_scope(section): + assert section return section.split(":", 1)[0] if ":" in section else section def walk_options(self, root_section): @@ -343,8 +344,11 @@ class ProjectConfigBase: section, option = match.group(1), match.group(2) # handle built-in variables - if section is None and option in self.BUILTIN_VARS: - return self.BUILTIN_VARS[option]() + if section is None: + if option in self.BUILTIN_VARS: + return self.BUILTIN_VARS[option]() + # SCons varaibles + return f"${option}" # handle system environment variables if section == "sysenv": diff --git a/tests/project/test_config.py b/tests/project/test_config.py index 3f368fe1..c15aa7bc 100644 --- a/tests/project/test_config.py +++ b/tests/project/test_config.py @@ -657,7 +657,9 @@ build_dir = /tmp/pio-$PROJECT_HASH data_dir = $PROJECT_DIR/assets [env:myenv] -build_flags = -D UTIME=${UNIX_TIME} +build_flags = + -D UTIME=${UNIX_TIME} + -I ${PROJECTSRC_DIR}/hal test_testing_command = ${platformio.packages_dir}/tool-simavr/bin/simavr -m @@ -672,6 +674,7 @@ test_testing_command = os.path.join("$PROJECT_DIR", "assets") ) assert config.get("env:myenv", "build_flags")[0][-10:].isdigit() + assert config.get("env:myenv", "build_flags")[1] == "-I $PROJECTSRC_DIR/hal" testing_command = config.get("env:myenv", "test_testing_command") assert "$" not in " ".join(testing_command) From 485f801c74032237d3b1a92e8bfaedbb5e59c608 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 11 Jan 2024 19:23:59 +0200 Subject: [PATCH 3/6] Bump version to 6.1.13a2 --- platformio/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio/__init__.py b/platformio/__init__.py index c90ba11e..3d4f4017 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -VERSION = (6, 1, "13a1") +VERSION = (6, 1, "13a2") __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" From f31f9fa616dd5e2a08f3a393eb92fbf0abe649ca Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 11 Jan 2024 21:33:01 +0200 Subject: [PATCH 4/6] Expanded support for SCons variables declared in the legacy format ``${SCONS_VARNAME}`` // Resolve #4828 --- platformio/project/config.py | 2 +- tests/project/test_config.py | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/platformio/project/config.py b/platformio/project/config.py index f138f26c..c583c0d2 100644 --- a/platformio/project/config.py +++ b/platformio/project/config.py @@ -348,7 +348,7 @@ class ProjectConfigBase: if option in self.BUILTIN_VARS: return self.BUILTIN_VARS[option]() # SCons varaibles - return f"${option}" + return f"${{{option}}}" # handle system environment variables if section == "sysenv": diff --git a/tests/project/test_config.py b/tests/project/test_config.py index c15aa7bc..02741b95 100644 --- a/tests/project/test_config.py +++ b/tests/project/test_config.py @@ -660,12 +660,14 @@ data_dir = $PROJECT_DIR/assets build_flags = -D UTIME=${UNIX_TIME} -I ${PROJECTSRC_DIR}/hal + -Wl,-Map,${BUILD_DIR}/${PROGNAME}.map test_testing_command = ${platformio.packages_dir}/tool-simavr/bin/simavr -m atmega328p -f 16000000L + ${UPLOAD_PORT and "-p "+UPLOAD_PORT} ${platformio.build_dir}/${this.__env__}/firmware.elf """ ) @@ -674,9 +676,14 @@ test_testing_command = os.path.join("$PROJECT_DIR", "assets") ) assert config.get("env:myenv", "build_flags")[0][-10:].isdigit() - assert config.get("env:myenv", "build_flags")[1] == "-I $PROJECTSRC_DIR/hal" + assert config.get("env:myenv", "build_flags")[1] == "-I ${PROJECTSRC_DIR}/hal" + assert ( + config.get("env:myenv", "build_flags")[2] + == "-Wl,-Map,${BUILD_DIR}/${PROGNAME}.map" + ) testing_command = config.get("env:myenv", "test_testing_command") - assert "$" not in " ".join(testing_command) + assert "$" not in testing_command[0] + assert testing_command[5] == '${UPLOAD_PORT and "-p "+UPLOAD_PORT}' def test_extends_order(tmp_path: Path): From 17ba91977db3d5991b37b4811081e328c277d225 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 12 Jan 2024 12:51:28 +0200 Subject: [PATCH 5/6] Update deps --- platformio/pipdeps.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio/pipdeps.py b/platformio/pipdeps.py index e9674dda..677d8c9d 100644 --- a/platformio/pipdeps.py +++ b/platformio/pipdeps.py @@ -35,7 +35,7 @@ def get_pip_dependencies(): home = [ # PIO Home requirements "ajsonrpc == 1.2.*", - "starlette >=0.19, <0.35", + "starlette >=0.19, <0.36", "uvicorn %s" % ("== 0.16.0" if PY36 else ">=0.16, <0.26"), "wsproto == 1.*", ] From 700c7053170713813c403931333e05aa1d318305 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 12 Jan 2024 12:51:49 +0200 Subject: [PATCH 6/6] Bump version to 6.1.13 --- HISTORY.rst | 2 +- docs | 2 +- platformio/__init__.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 7a6a93cd..f26bad63 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -17,7 +17,7 @@ Unlock the true potential of embedded software development with PlatformIO's collaborative ecosystem, embracing declarative principles, test-driven methodologies, and modern toolchains for unrivaled success. -6.1.13 (2024-??-??) +6.1.13 (2024-01-12) ~~~~~~~~~~~~~~~~~~~ * Expanded support for SCons variables declared in the legacy format ``${SCONS_VARNAME}`` (`issue #4828 `_) diff --git a/docs b/docs index c3657d69..3f021525 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit c3657d698d29cb8ba02bc709958ec22e7f5def04 +Subproject commit 3f02152561334a92bd8cae5c49e35cc194f86721 diff --git a/platformio/__init__.py b/platformio/__init__.py index 3d4f4017..7024104f 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -VERSION = (6, 1, "13a2") +VERSION = (6, 1, 13) __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio"