forked from platformio/platformio-core
Get rid of direct imports
This commit is contained in:
@ -4,8 +4,8 @@
|
|||||||
"name": "!!! WARNING !!! AUTO-GENERATED FILE, PLEASE DO NOT MODIFY IT AND USE https://docs.platformio.org/page/projectconf/section_env_build.html#build-flags"
|
"name": "!!! WARNING !!! AUTO-GENERATED FILE, PLEASE DO NOT MODIFY IT AND USE https://docs.platformio.org/page/projectconf/section_env_build.html#build-flags"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
% import os
|
||||||
% import platform
|
% import platform
|
||||||
% from os.path import commonprefix, dirname, isabs, isdir, isfile, join
|
|
||||||
%
|
%
|
||||||
% systype = platform.system().lower()
|
% systype = platform.system().lower()
|
||||||
%
|
%
|
||||||
@ -19,8 +19,8 @@
|
|||||||
%
|
%
|
||||||
% def _find_abs_path(inc, inc_paths):
|
% def _find_abs_path(inc, inc_paths):
|
||||||
% for path in inc_paths:
|
% for path in inc_paths:
|
||||||
% if isfile(join(path, inc)):
|
% if os.path.isfile(os.path.join(path, inc)):
|
||||||
% return join(path, inc)
|
% return os.path.join(path, inc)
|
||||||
% end
|
% end
|
||||||
% end
|
% end
|
||||||
% return inc
|
% return inc
|
||||||
@ -35,7 +35,7 @@
|
|||||||
% i = i + 1
|
% i = i + 1
|
||||||
% if i < length and not flags[i].startswith("-"):
|
% if i < length and not flags[i].startswith("-"):
|
||||||
% inc = flags[i]
|
% inc = flags[i]
|
||||||
% if not isabs(inc):
|
% if not os.path.isabs(inc):
|
||||||
% inc = _find_abs_path(inc, inc_paths)
|
% inc = _find_abs_path(inc, inc_paths)
|
||||||
% end
|
% end
|
||||||
% result.append(to_unix_path(inc))
|
% result.append(to_unix_path(inc))
|
||||||
@ -73,7 +73,8 @@
|
|||||||
%
|
%
|
||||||
% cleaned_includes = []
|
% cleaned_includes = []
|
||||||
% for include in includes:
|
% for include in includes:
|
||||||
% if "toolchain-" not in dirname(commonprefix([include, cc_path])) and isdir(include):
|
% if "toolchain-" not in os.path.dirname(os.path.commonprefix(
|
||||||
|
% [include, cc_path])) and os.path.isdir(include):
|
||||||
% cleaned_includes.append(include)
|
% cleaned_includes.append(include)
|
||||||
% end
|
% end
|
||||||
% end
|
% end
|
||||||
|
Reference in New Issue
Block a user