mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 01:57:13 +02:00
Add support for BBC micro:bit board that is built on the ARM mbed and Nordic nrf51 platform // Resolve #709
This commit is contained in:
@ -64,6 +64,9 @@ PlatformIO 3.0
|
|||||||
+ Support for the 3rd party manifests (Arduino IDE "library.properties"
|
+ Support for the 3rd party manifests (Arduino IDE "library.properties"
|
||||||
and ARM mbed "module.json")
|
and ARM mbed "module.json")
|
||||||
|
|
||||||
|
* Added support for BBC micro:bit board that is built on the ARM mbed and
|
||||||
|
Nordic nrf51 platform
|
||||||
|
(`issue #709 <https://github.com/platformio/platformio/issues/709>`_)
|
||||||
* Print human-readable information when processing environments without
|
* Print human-readable information when processing environments without
|
||||||
``-v, --verbose`` option
|
``-v, --verbose`` option
|
||||||
(`issue #721 <https://github.com/platformio/platformio/issues/721>`_)
|
(`issue #721 <https://github.com/platformio/platformio/issues/721>`_)
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
VERSION = (3, 0, "0a2")
|
VERSION = (3, 0, "0a3")
|
||||||
__version__ = ".".join([str(s) for s in VERSION])
|
__version__ = ".".join([str(s) for s in VERSION])
|
||||||
|
|
||||||
__title__ = "platformio"
|
__title__ = "platformio"
|
||||||
|
@ -24,6 +24,7 @@ import SCons.Scanner
|
|||||||
|
|
||||||
from platformio import util
|
from platformio import util
|
||||||
from platformio.builder.tools import platformio as piotool
|
from platformio.builder.tools import platformio as piotool
|
||||||
|
from platformio.managers.lib import LibraryManager
|
||||||
|
|
||||||
|
|
||||||
class LibBuilderFactory(object):
|
class LibBuilderFactory(object):
|
||||||
@ -105,28 +106,8 @@ class LibBuilderBase(object): # pylint: disable=too-many-instance-attributes
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def dependencies(self):
|
def dependencies(self):
|
||||||
deps = self._manifest.get("dependencies")
|
return LibraryManager.normalize_dependencies(
|
||||||
if not deps:
|
self._manifest.get("dependencies", []))
|
||||||
return deps
|
|
||||||
items = []
|
|
||||||
if isinstance(deps, dict):
|
|
||||||
if "name" in deps:
|
|
||||||
items.append(deps)
|
|
||||||
else:
|
|
||||||
for name, version in deps.items():
|
|
||||||
items.append({"name": name, "version": version})
|
|
||||||
elif isinstance(deps, list):
|
|
||||||
items = [d for d in deps if "name" in d]
|
|
||||||
for item in items:
|
|
||||||
for k in ("frameworks", "platforms"):
|
|
||||||
if k not in item or isinstance(k, list):
|
|
||||||
continue
|
|
||||||
if item[k] == "*":
|
|
||||||
del item[k]
|
|
||||||
elif isinstance(item[k], basestring):
|
|
||||||
item[k] = [i.strip() for i in item[k].split(",")
|
|
||||||
if i.strip()]
|
|
||||||
return items
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def src_filter(self):
|
def src_filter(self):
|
||||||
|
@ -33,6 +33,30 @@ class LibraryManager(BasePkgManager):
|
|||||||
def manifest_name(self):
|
def manifest_name(self):
|
||||||
return ".library.json"
|
return ".library.json"
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def normalize_dependencies(dependencies):
|
||||||
|
if not dependencies:
|
||||||
|
return []
|
||||||
|
items = []
|
||||||
|
if isinstance(dependencies, dict):
|
||||||
|
if "name" in dependencies:
|
||||||
|
items.append(dependencies)
|
||||||
|
else:
|
||||||
|
for name, version in dependencies.items():
|
||||||
|
items.append({"name": name, "version": version})
|
||||||
|
elif isinstance(dependencies, list):
|
||||||
|
items = [d for d in dependencies if "name" in d]
|
||||||
|
for item in items:
|
||||||
|
for k in ("frameworks", "platforms"):
|
||||||
|
if k not in item or isinstance(k, list):
|
||||||
|
continue
|
||||||
|
if item[k] == "*":
|
||||||
|
del item[k]
|
||||||
|
elif isinstance(item[k], basestring):
|
||||||
|
item[k] = [i.strip() for i in item[k].split(",")
|
||||||
|
if i.strip()]
|
||||||
|
return items
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def max_satisfying_repo_version(versions, requirements=None):
|
def max_satisfying_repo_version(versions, requirements=None):
|
||||||
|
|
||||||
@ -132,10 +156,7 @@ class LibraryManager(BasePkgManager):
|
|||||||
if not quiet:
|
if not quiet:
|
||||||
click.secho("Installing dependencies", fg="yellow")
|
click.secho("Installing dependencies", fg="yellow")
|
||||||
|
|
||||||
_dependencies = manifest['dependencies']
|
for filters in self.normalize_dependencies(manifest['dependencies']):
|
||||||
if not isinstance(_dependencies, list):
|
|
||||||
_dependencies = [_dependencies]
|
|
||||||
for filters in _dependencies:
|
|
||||||
assert "name" in filters
|
assert "name" in filters
|
||||||
if any([s in filters.get("version", "") for s in ("\\", "/")]):
|
if any([s in filters.get("version", "") for s in ("\\", "/")]):
|
||||||
self.install("{name}={version}".format(**filters))
|
self.install("{name}={version}".format(**filters))
|
||||||
|
Reference in New Issue
Block a user