forked from platformio/platformio-core
Install a dev-platform with ALL declared packages using a new `--with-all-packages
` option // Resolve #3345
This commit is contained in:
@ -19,6 +19,7 @@ PlatformIO Core 4.0
|
|||||||
- Added support for `PVS-Studio <https://docs.platformio.org/page/plus/check-tools/pvs-studio.html>`__ static code analyzer
|
- Added support for `PVS-Studio <https://docs.platformio.org/page/plus/check-tools/pvs-studio.html>`__ static code analyzer
|
||||||
|
|
||||||
* Control debug flags and optimization level with a new `debug_build_flags <https://docs.platformio.org/page/projectconf/section_env_debug.html#debug-build-flags>`__ option
|
* Control debug flags and optimization level with a new `debug_build_flags <https://docs.platformio.org/page/projectconf/section_env_debug.html#debug-build-flags>`__ option
|
||||||
|
* Install a dev-platform with ALL declared packages using a new ``--with-all-packages`` option for `pio platform install <https://docs.platformio.org/page/userguide/platforms/cmd_install.html>`__ command (`issue #3345 <https://github.com/platformio/platformio-core/issues/3345>`_)
|
||||||
* Added support for "pythonPackages" in `platform.json <https://docs.platformio.org/page/platforms/creating_platform.html#manifest-file-platform-json>`__ manifest (PlatformIO Package Manager will install dependent Python packages from PyPi registry automatically when dev-platform is installed)
|
* Added support for "pythonPackages" in `platform.json <https://docs.platformio.org/page/platforms/creating_platform.html#manifest-file-platform-json>`__ manifest (PlatformIO Package Manager will install dependent Python packages from PyPi registry automatically when dev-platform is installed)
|
||||||
* Handle project configuration (monitor, test, and upload options) for PIO Remote commands (`issue #2591 <https://github.com/platformio/platformio-core/issues/2591>`_)
|
* Handle project configuration (monitor, test, and upload options) for PIO Remote commands (`issue #2591 <https://github.com/platformio/platformio-core/issues/2591>`_)
|
||||||
* Updated SCons tool to 3.1.2
|
* Updated SCons tool to 3.1.2
|
||||||
|
2
docs
2
docs
Submodule docs updated: cfc5eed060...7b3bc1494a
@ -299,14 +299,20 @@ def platform_show(platform, json_output): # pylint: disable=too-many-branches
|
|||||||
@click.option("--with-package", multiple=True)
|
@click.option("--with-package", multiple=True)
|
||||||
@click.option("--without-package", multiple=True)
|
@click.option("--without-package", multiple=True)
|
||||||
@click.option("--skip-default-package", is_flag=True)
|
@click.option("--skip-default-package", is_flag=True)
|
||||||
|
@click.option("--with-all-packages", is_flag=True)
|
||||||
@click.option(
|
@click.option(
|
||||||
"-f",
|
"-f",
|
||||||
"--force",
|
"--force",
|
||||||
is_flag=True,
|
is_flag=True,
|
||||||
help="Reinstall/redownload dev/platform and its packages if exist",
|
help="Reinstall/redownload dev/platform and its packages if exist",
|
||||||
)
|
)
|
||||||
def platform_install(
|
def platform_install( # pylint: disable=too-many-arguments
|
||||||
platforms, with_package, without_package, skip_default_package, force
|
platforms,
|
||||||
|
with_package,
|
||||||
|
without_package,
|
||||||
|
skip_default_package,
|
||||||
|
with_all_packages,
|
||||||
|
force,
|
||||||
):
|
):
|
||||||
pm = PlatformManager()
|
pm = PlatformManager()
|
||||||
for platform in platforms:
|
for platform in platforms:
|
||||||
@ -315,6 +321,7 @@ def platform_install(
|
|||||||
with_packages=with_package,
|
with_packages=with_package,
|
||||||
without_packages=without_package,
|
without_packages=without_package,
|
||||||
skip_default_package=skip_default_package,
|
skip_default_package=skip_default_package,
|
||||||
|
with_all_packages=with_all_packages,
|
||||||
force=force,
|
force=force,
|
||||||
):
|
):
|
||||||
click.secho(
|
click.secho(
|
||||||
|
@ -74,6 +74,7 @@ class PlatformManager(BasePkgManager):
|
|||||||
with_packages=None,
|
with_packages=None,
|
||||||
without_packages=None,
|
without_packages=None,
|
||||||
skip_default_package=False,
|
skip_default_package=False,
|
||||||
|
with_all_packages=False,
|
||||||
after_update=False,
|
after_update=False,
|
||||||
silent=False,
|
silent=False,
|
||||||
force=False,
|
force=False,
|
||||||
@ -84,6 +85,9 @@ class PlatformManager(BasePkgManager):
|
|||||||
)
|
)
|
||||||
p = PlatformFactory.newPlatform(platform_dir)
|
p = PlatformFactory.newPlatform(platform_dir)
|
||||||
|
|
||||||
|
if with_all_packages:
|
||||||
|
with_packages = list(p.packages.keys())
|
||||||
|
|
||||||
# don't cleanup packages or install them after update
|
# don't cleanup packages or install them after update
|
||||||
# we check packages for updates in def update()
|
# we check packages for updates in def update()
|
||||||
if after_update:
|
if after_update:
|
||||||
|
Reference in New Issue
Block a user