Skip to content

Commit

Permalink
Merge branch 'release/v6.1.13'
Browse files Browse the repository at this point in the history
  • Loading branch information
ivankravets committed Jan 12, 2024
2 parents ca1f633 + 700c705 commit ffacd17
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 7 deletions.
5 changes: 5 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://github.com/platformio/platformio-core/issues/4828>`_)

6.1.12 (2024-01-10)
~~~~~~~~~~~~~~~~~~~

Expand Down
2 changes: 1 addition & 1 deletion docs
Submodule docs updated 0 files
2 changes: 1 addition & 1 deletion platformio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion platformio/pipdeps.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.*",
]
Expand Down
8 changes: 6 additions & 2 deletions platformio/project/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ def _maintain_renamed_options(self):

@staticmethod
def get_section_scope(section):
assert section
return section.split(":", 1)[0] if ":" in section else section

def walk_options(self, root_section):
Expand Down Expand Up @@ -343,8 +344,11 @@ def _re_interpolation_handler(self, parent_section, parent_option, match):
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":
Expand Down
14 changes: 12 additions & 2 deletions tests/project/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -657,13 +657,17 @@ def test_nested_interpolation(tmp_path: Path):
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
"""
)
Expand All @@ -672,8 +676,14 @@ def test_nested_interpolation(tmp_path: Path):
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):
Expand Down

0 comments on commit ffacd17

Please sign in to comment.