From c84709dd9d8bee3a10178d12084adb12d0dc154b Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Tue, 8 Mar 2022 15:57:25 +0200 Subject: [PATCH] Switch to the new "pio pkg install" command --- scripts/install_devplatforms.py | 15 +++++++++++---- tox.ini | 4 ++-- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/scripts/install_devplatforms.py b/scripts/install_devplatforms.py index af579e17..80526d90 100644 --- a/scripts/install_devplatforms.py +++ b/scripts/install_devplatforms.py @@ -33,9 +33,7 @@ import click ) def main(desktop, ignore, ownernames): platforms = json.loads( - subprocess.check_output( - ["platformio", "platform", "search", "--json-output"] - ).decode() + subprocess.check_output(["pio", "platform", "search", "--json-output"]).decode() ) ignore = [n.strip() for n in (ignore or "").split(",") if n.strip()] ownernames = [n.strip() for n in (ownernames or "").split(",") if n.strip()] @@ -47,7 +45,16 @@ def main(desktop, ignore, ownernames): ] if any(skip): continue - subprocess.check_call(["platformio", "platform", "install", platform["name"]]) + subprocess.check_call( + [ + "pio", + "pkg", + "install", + "--global", + "--platform", + "{ownername}/{name}".format(**platform), + ] + ) if __name__ == "__main__": diff --git a/tox.ini b/tox.ini index 0ee9c0ec..e367a4f4 100644 --- a/tox.ini +++ b/tox.ini @@ -40,12 +40,12 @@ commands = [testenv:testcore] commands = {envpython} --version - py.test -v --basetemp="{envtmpdir}" -k "not skip_ci" tests --ignore tests/test_examples.py + py.test -v -k "not skip_ci" tests --ignore tests/test_examples.py [testenv:testexamples] commands = {envpython} scripts/install_devplatforms.py - py.test -v --basetemp="{envtmpdir}" tests/test_examples.py + py.test -v tests/test_examples.py [testenv:docs] ; basepython = ~/.pyenv/versions/3.6.12/bin/python