mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-31 02:27:13 +02:00
Handle upper-cased "Include" & "Src" folders
This commit is contained in:
@ -184,19 +184,19 @@ class LibBuilderBase(object):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def include_dir(self):
|
def include_dir(self):
|
||||||
return (
|
for name in ("include", "Include"):
|
||||||
os.path.join(self.path, "include")
|
d = os.path.join(self.path, name)
|
||||||
if os.path.isdir(os.path.join(self.path, "include"))
|
if os.path.isdir(d):
|
||||||
else None
|
return d
|
||||||
)
|
return None
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def src_dir(self):
|
def src_dir(self):
|
||||||
return (
|
for name in ("src", "Src"):
|
||||||
os.path.join(self.path, "src")
|
d = os.path.join(self.path, name)
|
||||||
if os.path.isdir(os.path.join(self.path, "src"))
|
if os.path.isdir(d):
|
||||||
else self.path
|
return d
|
||||||
)
|
return None
|
||||||
|
|
||||||
def get_include_dirs(self):
|
def get_include_dirs(self):
|
||||||
items = []
|
items = []
|
||||||
@ -601,12 +601,6 @@ class MbedLibBuilder(LibBuilderBase):
|
|||||||
return {}
|
return {}
|
||||||
return ManifestParserFactory.new_from_file(manifest_path).as_dict()
|
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
|
@property
|
||||||
def src_dir(self):
|
def src_dir(self):
|
||||||
if os.path.isdir(os.path.join(self.path, "source")):
|
if os.path.isdir(os.path.join(self.path, "source")):
|
||||||
|
Reference in New Issue
Block a user