mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-31 18:44:27 +02:00
Improve support for old mbed libraries without manifest
This commit is contained in:
@@ -4,6 +4,12 @@ Release Notes
|
|||||||
PlatformIO 3.0
|
PlatformIO 3.0
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
|
3.5.2 (2018-??-??)
|
||||||
|
~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
* Handle "os.mbed.com" URL as Mercurial (hg) repository
|
||||||
|
* Improved support for old mbed libraries without manifest
|
||||||
|
|
||||||
3.5.1 (2018-01-18)
|
3.5.1 (2018-01-18)
|
||||||
~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
@@ -516,8 +516,20 @@ class MbedLibBuilder(LibBuilderBase):
|
|||||||
include_dirs = LibBuilderBase.get_include_dirs(self)
|
include_dirs = LibBuilderBase.get_include_dirs(self)
|
||||||
if self.path not in include_dirs:
|
if self.path not in include_dirs:
|
||||||
include_dirs.append(self.path)
|
include_dirs.append(self.path)
|
||||||
|
|
||||||
|
# library with module.json
|
||||||
for p in self._manifest.get("extraIncludes", []):
|
for p in self._manifest.get("extraIncludes", []):
|
||||||
include_dirs.append(join(self.path, p))
|
include_dirs.append(join(self.path, p))
|
||||||
|
|
||||||
|
# old mbed library without manifest, add to CPPPATH all folders
|
||||||
|
if not self._manifest:
|
||||||
|
for root, _, __ in os.walk(self.path):
|
||||||
|
part = root.replace(self.path, "").lower()
|
||||||
|
if any(s in part for s in ("%s." % sep, "test", "example")):
|
||||||
|
continue
|
||||||
|
if root not in include_dirs:
|
||||||
|
include_dirs.append(root)
|
||||||
|
|
||||||
return include_dirs
|
return include_dirs
|
||||||
|
|
||||||
def is_frameworks_compatible(self, frameworks):
|
def is_frameworks_compatible(self, frameworks):
|
||||||
|
Reference in New Issue
Block a user