mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-29 17:47:14 +02:00
Show full library version in "Library Dependency Graph" including VCS information // Issue #1274
This commit is contained in:
@ -11,10 +11,14 @@ PlatformIO 3.0
|
||||
`PIO Unit Testing <http://docs.platformio.org/page/plus/unit-testing.html>`__
|
||||
engine and a target device
|
||||
(`issue #1273 <https://github.com/platformio/platformio-core/issues/1273>`_)
|
||||
* Show full library version in "Library Dependency Graph" including VCS
|
||||
information
|
||||
(`issue #1274 <https://github.com/platformio/platformio-core/issues/1274>`_)
|
||||
* Configure a custom firmware/program name in build directory (`example <http://docs.platformio.org/page/projectconf/advanced_scripting.html#custom-firmware-program-name>`__)
|
||||
* Renamed ``envs_dir`` option to ``build_dir``
|
||||
in `Project Configuration File "platformio.ini" <http://docs.platformio.org/page/projectconf/section_platformio.html#build-dir>`__
|
||||
* Refactored code without "arrow" dependency (resolve issue with "ImportError: No module named backports.functools_lru_cache")
|
||||
* Refactored code without "arrow" dependency (resolve issue with "ImportError:
|
||||
No module named backports.functools_lru_cache")
|
||||
* Improved support of PIO Unified Debugger for Eclipse Oxygen
|
||||
* Improved a work in off-line mode
|
||||
* Fixed project generator for CLion and Qt Creator IDE
|
||||
|
@ -20,6 +20,7 @@ from __future__ import absolute_import
|
||||
import hashlib
|
||||
import os
|
||||
import sys
|
||||
from glob import glob
|
||||
from os.path import (basename, commonprefix, dirname, isdir, isfile, join,
|
||||
realpath, sep)
|
||||
from platform import system
|
||||
@ -30,6 +31,7 @@ from SCons.Script import ARGUMENTS, COMMAND_LINE_TARGETS, DefaultEnvironment
|
||||
from platformio import util
|
||||
from platformio.builder.tools import platformio as piotool
|
||||
from platformio.managers.lib import LibraryManager
|
||||
from platformio.managers.package import PackageManager
|
||||
|
||||
|
||||
class LibBuilderFactory(object):
|
||||
@ -131,6 +133,13 @@ class LibBuilderBase(object):
|
||||
def version(self):
|
||||
return self._manifest.get("version")
|
||||
|
||||
@property
|
||||
def vcs_info(self):
|
||||
items = glob(join(self.path, ".*", PackageManager.SRC_MANIFEST_NAME))
|
||||
if not items:
|
||||
return None
|
||||
return util.load_json(items[0])
|
||||
|
||||
@property
|
||||
def dependencies(self):
|
||||
return LibraryManager.normalize_dependencies(
|
||||
@ -791,10 +800,15 @@ def BuildProjectLibraries(env):
|
||||
margin = "| " * (level)
|
||||
for lb in root.depbuilders:
|
||||
title = "<%s>" % lb.name
|
||||
vcs_info = lb.vcs_info
|
||||
if lb.version:
|
||||
title += " v%s" % lb.version
|
||||
if vcs_info:
|
||||
title += " #%s" % vcs_info.get("version")
|
||||
sys.stdout.write("%s|-- %s" % (margin, title))
|
||||
if int(ARGUMENTS.get("PIOVERBOSE", 0)):
|
||||
if vcs_info:
|
||||
sys.stdout.write(" [%s]" % vcs_info.get("url"))
|
||||
sys.stdout.write(" (")
|
||||
sys.stdout.write(lb.path)
|
||||
sys.stdout.write(")")
|
||||
|
Reference in New Issue
Block a user