mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 18:17:13 +02:00
Allow ignoring "platforms" and "frameworks" fields in "library.json" and treat a library as compatible with all
This commit is contained in:
2
docs
2
docs
Submodule docs updated: da10bb5e00...13df46f9cf
@ -531,10 +531,7 @@ class ArduinoLibBuilder(LibBuilderBase):
|
|||||||
return util.items_in_list(frameworks, ["arduino", "energia"])
|
return util.items_in_list(frameworks, ["arduino", "energia"])
|
||||||
|
|
||||||
def is_platforms_compatible(self, platforms):
|
def is_platforms_compatible(self, platforms):
|
||||||
items = self._manifest.get("platforms", [])
|
return util.items_in_list(platforms, self._manifest.get("platforms") or ["*"])
|
||||||
if not items:
|
|
||||||
return LibBuilderBase.is_platforms_compatible(self, platforms)
|
|
||||||
return util.items_in_list(platforms, items)
|
|
||||||
|
|
||||||
|
|
||||||
class MbedLibBuilder(LibBuilderBase):
|
class MbedLibBuilder(LibBuilderBase):
|
||||||
@ -768,16 +765,10 @@ class PlatformIOLibBuilder(LibBuilderBase):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def is_platforms_compatible(self, platforms):
|
def is_platforms_compatible(self, platforms):
|
||||||
items = self._manifest.get("platforms")
|
return util.items_in_list(platforms, self._manifest.get("platforms") or ["*"])
|
||||||
if not items:
|
|
||||||
return LibBuilderBase.is_platforms_compatible(self, platforms)
|
|
||||||
return util.items_in_list(platforms, items)
|
|
||||||
|
|
||||||
def is_frameworks_compatible(self, frameworks):
|
def is_frameworks_compatible(self, frameworks):
|
||||||
items = self._manifest.get("frameworks")
|
return util.items_in_list(frameworks, self._manifest.get("frameworks") or ["*"])
|
||||||
if not items:
|
|
||||||
return LibBuilderBase.is_frameworks_compatible(self, frameworks)
|
|
||||||
return util.items_in_list(frameworks, items)
|
|
||||||
|
|
||||||
def get_include_dirs(self):
|
def get_include_dirs(self):
|
||||||
include_dirs = LibBuilderBase.get_include_dirs(self)
|
include_dirs = LibBuilderBase.get_include_dirs(self)
|
||||||
|
Reference in New Issue
Block a user