mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 10:07:14 +02:00
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
|
$ platformio show SomePlatform
|
||||||
|
|
||||||
# Example
|
# Example
|
||||||
$ platformio show timsp430
|
$ platformio show atmelavr
|
||||||
timsp430 - An embedded platform for TI MSP430 microcontrollers (with Energia Framework)
|
atmelavr - An embedded platform for Atmel AVR microcontrollers (with Arduino Framework)
|
||||||
----------
|
----------
|
||||||
Package: toolchain-timsp430
|
Package: toolchain-atmelavr
|
||||||
Location: /Users/ikravets/.platformio/timsp430/tools/toolchain
|
Alias: toolchain
|
||||||
|
Location: /Users/ikravets/.platformio/atmelavr/tools/toolchain
|
||||||
Version: 1
|
Version: 1
|
||||||
----------
|
----------
|
||||||
Package: tool-mspdebug
|
Package: tool-avrdude
|
||||||
Location: /Users/ikravets/.platformio/timsp430/tools/mspdebug
|
Alias: uploader
|
||||||
|
Location: /Users/ikravets/.platformio/atmelavr/tools/avrdude
|
||||||
Version: 1
|
Version: 1
|
||||||
----------
|
----------
|
||||||
Package: framework-energiamsp430
|
Package: framework-arduinoavr
|
||||||
Location: /Users/ikravets/.platformio/timsp430/frameworks/energia
|
Location: /Users/ikravets/.platformio/atmelavr/frameworks/arduino
|
||||||
Version: 1
|
Version: 1
|
||||||
|
|
||||||
|
|
||||||
|
@ -23,7 +23,10 @@ def cli(platform):
|
|||||||
|
|
||||||
pm = PackageManager(platform)
|
pm = PackageManager(platform)
|
||||||
for name, data in pm.get_installed(platform).items():
|
for name, data in pm.get_installed(platform).items():
|
||||||
|
pkgalias = p.get_pkg_alias(name)
|
||||||
echo("----------")
|
echo("----------")
|
||||||
echo("Package: %s" % style(name, fg="yellow"))
|
echo("Package: %s" % style(name, fg="yellow"))
|
||||||
|
if pkgalias:
|
||||||
|
echo("Alias: %s" % pkgalias)
|
||||||
echo("Location: %s" % join(pm.get_platform_dir(), data['path']))
|
echo("Location: %s" % join(pm.get_platform_dir(), data['path']))
|
||||||
echo("Version: %d" % int(data['version']))
|
echo("Version: %d" % int(data['version']))
|
||||||
|
@ -40,6 +40,9 @@ class BasePlatform(object):
|
|||||||
else:
|
else:
|
||||||
raise NotImplementedError()
|
raise NotImplementedError()
|
||||||
|
|
||||||
|
def get_pkg_alias(self, pkgname):
|
||||||
|
return self.PACKAGES[pkgname].get("alias", None)
|
||||||
|
|
||||||
def pkg_aliases_to_names(self, aliases):
|
def pkg_aliases_to_names(self, aliases):
|
||||||
names = []
|
names = []
|
||||||
for alias in aliases:
|
for alias in aliases:
|
||||||
|
Reference in New Issue
Block a user