Improve support for "library.properties" manifest

This commit is contained in:
Ivan Kravets
2016-08-23 13:40:32 +03:00
parent 81d3b7fd11
commit 5a63060699
2 changed files with 10 additions and 4 deletions

View File

@ -14,7 +14,7 @@
import sys
VERSION = (3, 0, "0a6")
VERSION = (3, 0, "0a7")
__version__ = ".".join([str(s) for s in VERSION])
__title__ = "platformio"

View File

@ -33,7 +33,9 @@ class LibBuilderFactory(object):
@staticmethod
def new(env, path):
clsname = "UnknownLibBuilder"
if isfile(join(path, "library.json")):
if isfile(join(path, "library.properties")):
clsname = "ArduinoLibBuilder"
elif isfile(join(path, "library.json")):
clsname = "PlatformIOLibBuilder"
else:
env_frameworks = [
@ -354,8 +356,12 @@ class ArduinoLibBuilder(LibBuilderBase):
def src_filter(self):
if isdir(join(self.path, "src")):
return LibBuilderBase.src_filter.fget(self)
return ["+<*.%s>" % ext
for ext in piotool.SRC_BUILD_EXT + piotool.SRC_HEADER_EXT]
src_filter = [
"+<*.%s>" % ext
for ext in piotool.SRC_BUILD_EXT + piotool.SRC_HEADER_EXT
]
src_filter.append("+<utility%s>" + sep)
return src_filter
def is_framework_compatible(self, framework):
return framework.lower() in ("arduino", "energia")