forked from platformio/platformio-core
Docs: Sync with dev-platforms
This commit is contained in:
2
docs
2
docs
Submodule docs updated: 755c22685b...d754678ca2
2
examples
2
examples
Submodule examples updated: 35d7abd459...75ac8cb487
@ -13,10 +13,10 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import functools
|
import functools
|
||||||
import json
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import tempfile
|
import tempfile
|
||||||
|
from urllib.parse import ParseResult, urlparse, urlunparse
|
||||||
|
|
||||||
sys.path.append("..")
|
sys.path.append("..")
|
||||||
|
|
||||||
@ -26,10 +26,6 @@ from platformio import fs, util # noqa: E402
|
|||||||
from platformio.package.manager.platform import PlatformPackageManager # noqa: E402
|
from platformio.package.manager.platform import PlatformPackageManager # noqa: E402
|
||||||
from platformio.platform.factory import PlatformFactory # noqa: E402
|
from platformio.platform.factory import PlatformFactory # noqa: E402
|
||||||
|
|
||||||
try:
|
|
||||||
from urlparse import ParseResult, urlparse, urlunparse
|
|
||||||
except ImportError:
|
|
||||||
from urllib.parse import ParseResult, urlparse, urlunparse
|
|
||||||
|
|
||||||
RST_COPYRIGHT = """.. Copyright (c) 2014-present PlatformIO <contact@platformio.org>
|
RST_COPYRIGHT = """.. Copyright (c) 2014-present PlatformIO <contact@platformio.org>
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -75,7 +71,7 @@ def install_platforms():
|
|||||||
page = 1
|
page = 1
|
||||||
pm = PlatformPackageManager()
|
pm = PlatformPackageManager()
|
||||||
while True:
|
while True:
|
||||||
result = REGCLIENT.list_packages(filters=dict(types=["platform"]), page=page)
|
result = REGCLIENT.list_packages(qualifiers=dict(types=["platform"]), page=page)
|
||||||
for item in result["items"]:
|
for item in result["items"]:
|
||||||
spec = "%s/%s" % (item["owner"]["username"], item["name"])
|
spec = "%s/%s" % (item["owner"]["username"], item["name"])
|
||||||
skip_conds = [
|
skip_conds = [
|
||||||
@ -85,7 +81,7 @@ def install_platforms():
|
|||||||
if all(skip_conds):
|
if all(skip_conds):
|
||||||
click.secho("Skip community platform: %s" % spec, fg="yellow")
|
click.secho("Skip community platform: %s" % spec, fg="yellow")
|
||||||
continue
|
continue
|
||||||
pm.install(spec, skip_default_package=True)
|
pm.install(spec, skip_dependencies=True)
|
||||||
page += 1
|
page += 1
|
||||||
if not result["items"] or result["page"] * result["limit"] >= result["total"]:
|
if not result["items"] or result["page"] * result["limit"] >= result["total"]:
|
||||||
break
|
break
|
||||||
|
Reference in New Issue
Block a user