forked from platformio/platformio-core
Show "Alias" for packages in "platformio show" command
This commit is contained in:
18
README.rst
18
README.rst
@ -517,19 +517,21 @@ To show details about an installed platform:
|
||||
$ platformio show SomePlatform
|
||||
|
||||
# Example
|
||||
$ platformio show timsp430
|
||||
timsp430 - An embedded platform for TI MSP430 microcontrollers (with Energia Framework)
|
||||
$ platformio show atmelavr
|
||||
atmelavr - An embedded platform for Atmel AVR microcontrollers (with Arduino Framework)
|
||||
----------
|
||||
Package: toolchain-timsp430
|
||||
Location: /Users/ikravets/.platformio/timsp430/tools/toolchain
|
||||
Package: toolchain-atmelavr
|
||||
Alias: toolchain
|
||||
Location: /Users/ikravets/.platformio/atmelavr/tools/toolchain
|
||||
Version: 1
|
||||
----------
|
||||
Package: tool-mspdebug
|
||||
Location: /Users/ikravets/.platformio/timsp430/tools/mspdebug
|
||||
Package: tool-avrdude
|
||||
Alias: uploader
|
||||
Location: /Users/ikravets/.platformio/atmelavr/tools/avrdude
|
||||
Version: 1
|
||||
----------
|
||||
Package: framework-energiamsp430
|
||||
Location: /Users/ikravets/.platformio/timsp430/frameworks/energia
|
||||
Package: framework-arduinoavr
|
||||
Location: /Users/ikravets/.platformio/atmelavr/frameworks/arduino
|
||||
Version: 1
|
||||
|
||||
|
||||
|
@ -23,7 +23,10 @@ def cli(platform):
|
||||
|
||||
pm = PackageManager(platform)
|
||||
for name, data in pm.get_installed(platform).items():
|
||||
pkgalias = p.get_pkg_alias(name)
|
||||
echo("----------")
|
||||
echo("Package: %s" % style(name, fg="yellow"))
|
||||
if pkgalias:
|
||||
echo("Alias: %s" % pkgalias)
|
||||
echo("Location: %s" % join(pm.get_platform_dir(), data['path']))
|
||||
echo("Version: %d" % int(data['version']))
|
||||
|
@ -40,6 +40,9 @@ class BasePlatform(object):
|
||||
else:
|
||||
raise NotImplementedError()
|
||||
|
||||
def get_pkg_alias(self, pkgname):
|
||||
return self.PACKAGES[pkgname].get("alias", None)
|
||||
|
||||
def pkg_aliases_to_names(self, aliases):
|
||||
names = []
|
||||
for alias in aliases:
|
||||
|
Reference in New Issue
Block a user