diff --git a/HISTORY.rst b/HISTORY.rst index 9624b244..f26bad63 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -17,6 +17,11 @@ 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-01-12) +~~~~~~~~~~~~~~~~~~~ + +* Expanded support for SCons variables declared in the legacy format ``${SCONS_VARNAME}`` (`issue #4828 `_) + 6.1.12 (2024-01-10) ~~~~~~~~~~~~~~~~~~~ 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 0e79928a..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, 12) +VERSION = (6, 1, 13) __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" 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.*", ] diff --git a/platformio/project/config.py b/platformio/project/config.py index 3d92a5ae..c583c0d2 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..02741b95 100644 --- a/tests/project/test_config.py +++ b/tests/project/test_config.py @@ -657,13 +657,17 @@ 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 + -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 """ ) @@ -672,8 +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")[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):