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