Handle upper-cased "Include" & "Src" folders

This commit is contained in:
Ivan Kravets
2021-10-08 14:58:41 +03:00
parent a1d55f2529
commit df83d90c06

View File

@ -184,19 +184,19 @@ class LibBuilderBase(object):
@property
def include_dir(self):
return (
os.path.join(self.path, "include")
if os.path.isdir(os.path.join(self.path, "include"))
else None
)
for name in ("include", "Include"):
d = os.path.join(self.path, name)
if os.path.isdir(d):
return d
return None
@property
def src_dir(self):
return (
os.path.join(self.path, "src")
if os.path.isdir(os.path.join(self.path, "src"))
else self.path
)
for name in ("src", "Src"):
d = os.path.join(self.path, name)
if os.path.isdir(d):
return d
return None
def get_include_dirs(self):
items = []
@ -601,12 +601,6 @@ class MbedLibBuilder(LibBuilderBase):
return {}
return ManifestParserFactory.new_from_file(manifest_path).as_dict()
@property
def include_dir(self):
if os.path.isdir(os.path.join(self.path, "include")):
return os.path.join(self.path, "include")
return None
@property
def src_dir(self):
if os.path.isdir(os.path.join(self.path, "source")):