Switch to the new "pio pkg install" command

This commit is contained in:
Ivan Kravets
2022-03-08 15:57:25 +02:00
parent f28651eaf7
commit c84709dd9d
2 changed files with 13 additions and 6 deletions

View File

@ -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__":

View File

@ -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