Skip to content

Commit ffacd17

Browse files
committed
Merge branch 'release/v6.1.13'
2 parents ca1f633 + 700c705 commit ffacd17

File tree

6 files changed

+26
-7
lines changed

6 files changed

+26
-7
lines changed

HISTORY.rst

+5
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ Unlock the true potential of embedded software development with
1717
PlatformIO's collaborative ecosystem, embracing declarative principles,
1818
test-driven methodologies, and modern toolchains for unrivaled success.
1919

20+
6.1.13 (2024-01-12)
21+
~~~~~~~~~~~~~~~~~~~
22+
23+
* Expanded support for SCons variables declared in the legacy format ``${SCONS_VARNAME}`` (`issue #4828 <https://github.com/platformio/platformio-core/issues/4828>`_)
24+
2025
6.1.12 (2024-01-10)
2126
~~~~~~~~~~~~~~~~~~~
2227

docs

Submodule docs updated from c3657d6 to 3f02152

platformio/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
VERSION = (6, 1, 12)
15+
VERSION = (6, 1, 13)
1616
__version__ = ".".join([str(s) for s in VERSION])
1717

1818
__title__ = "platformio"

platformio/pipdeps.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def get_pip_dependencies():
3535
home = [
3636
# PIO Home requirements
3737
"ajsonrpc == 1.2.*",
38-
"starlette >=0.19, <0.35",
38+
"starlette >=0.19, <0.36",
3939
"uvicorn %s" % ("== 0.16.0" if PY36 else ">=0.16, <0.26"),
4040
"wsproto == 1.*",
4141
]

platformio/project/config.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ def _maintain_renamed_options(self):
164164

165165
@staticmethod
166166
def get_section_scope(section):
167+
assert section
167168
return section.split(":", 1)[0] if ":" in section else section
168169

169170
def walk_options(self, root_section):
@@ -343,8 +344,11 @@ def _re_interpolation_handler(self, parent_section, parent_option, match):
343344
section, option = match.group(1), match.group(2)
344345

345346
# handle built-in variables
346-
if section is None and option in self.BUILTIN_VARS:
347-
return self.BUILTIN_VARS[option]()
347+
if section is None:
348+
if option in self.BUILTIN_VARS:
349+
return self.BUILTIN_VARS[option]()
350+
# SCons varaibles
351+
return f"${{{option}}}"
348352

349353
# handle system environment variables
350354
if section == "sysenv":

tests/project/test_config.py

+12-2
Original file line numberDiff line numberDiff line change
@@ -657,13 +657,17 @@ def test_nested_interpolation(tmp_path: Path):
657657
data_dir = $PROJECT_DIR/assets
658658
659659
[env:myenv]
660-
build_flags = -D UTIME=${UNIX_TIME}
660+
build_flags =
661+
-D UTIME=${UNIX_TIME}
662+
-I ${PROJECTSRC_DIR}/hal
663+
-Wl,-Map,${BUILD_DIR}/${PROGNAME}.map
661664
test_testing_command =
662665
${platformio.packages_dir}/tool-simavr/bin/simavr
663666
-m
664667
atmega328p
665668
-f
666669
16000000L
670+
${UPLOAD_PORT and "-p "+UPLOAD_PORT}
667671
${platformio.build_dir}/${this.__env__}/firmware.elf
668672
"""
669673
)
@@ -672,8 +676,14 @@ def test_nested_interpolation(tmp_path: Path):
672676
os.path.join("$PROJECT_DIR", "assets")
673677
)
674678
assert config.get("env:myenv", "build_flags")[0][-10:].isdigit()
679+
assert config.get("env:myenv", "build_flags")[1] == "-I ${PROJECTSRC_DIR}/hal"
680+
assert (
681+
config.get("env:myenv", "build_flags")[2]
682+
== "-Wl,-Map,${BUILD_DIR}/${PROGNAME}.map"
683+
)
675684
testing_command = config.get("env:myenv", "test_testing_command")
676-
assert "$" not in " ".join(testing_command)
685+
assert "$" not in testing_command[0]
686+
assert testing_command[5] == '${UPLOAD_PORT and "-p "+UPLOAD_PORT}'
677687

678688

679689
def test_extends_order(tmp_path: Path):

0 commit comments

Comments
 (0)