forked from platformio/platformio-core
Use a root of library when filtering source code using library.json and srcFilter field
This commit is contained in:
@@ -7,6 +7,9 @@ PlatformIO 3.0
|
|||||||
3.4.1 (2017-??-??)
|
3.4.1 (2017-??-??)
|
||||||
~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
* Use a root of library when filtering source code using
|
||||||
|
`library.json <http://docs.platformio.org/page/librarymanager/config.html>`__
|
||||||
|
and ``srcFilter`` field
|
||||||
* Do not ask for board ID when initialize project for desktop platform
|
* Do not ask for board ID when initialize project for desktop platform
|
||||||
* Fixed issue when can not load broken PIO Core state
|
* Fixed issue when can not load broken PIO Core state
|
||||||
|
|
||||||
|
@@ -521,6 +521,15 @@ class PlatformIOLibBuilder(LibBuilderBase):
|
|||||||
def _is_arduino_manifest(self):
|
def _is_arduino_manifest(self):
|
||||||
return isfile(join(self.path, "library.properties"))
|
return isfile(join(self.path, "library.properties"))
|
||||||
|
|
||||||
|
@property
|
||||||
|
def src_dir(self):
|
||||||
|
if all([
|
||||||
|
"srcFilter" in self._manifest.get("build", {}) or
|
||||||
|
self.env['SRC_FILTER'], not self._is_arduino_manifest()
|
||||||
|
]):
|
||||||
|
return self.path
|
||||||
|
return LibBuilderBase.src_dir.fget(self)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def src_filter(self):
|
def src_filter(self):
|
||||||
if "srcFilter" in self._manifest.get("build", {}):
|
if "srcFilter" in self._manifest.get("build", {}):
|
||||||
|
Reference in New Issue
Block a user