From: duplo Date: Mon, 22 Dec 2008 16:00:41 +0000 (+0000) Subject: Add the findToolchains function that allow to find the files that match the toolchain... X-Git-Tag: 2.1.0~566 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=0493a46dd5e7dde3d04c46b62b2185d8958ef97c;p=bertos.git Add the findToolchains function that allow to find the files that match the toolchain file pattern git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2116 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/wizard/bertos_utils.py b/wizard/bertos_utils.py index 99bdca23..0e1d4bbb 100644 --- a/wizard/bertos_utils.py +++ b/wizard/bertos_utils.py @@ -11,6 +11,7 @@ import os import fnmatch +import glob import const @@ -25,6 +26,12 @@ def createBertosProject(directory): os.mkdir(directory) open(directory + "/project.bertos", "w") +def findToolchains(pathList): + toolchains = [] + for element in pathList: + toolchains += glob.glob(element+ "/" + const.GCC_NAME) + return toolchains + def findDefinitions(ftype, path): L = os.walk(path) for element in L: diff --git a/wizard/const.py b/wizard/const.py index 7b30cb8e..e0106b38 100644 --- a/wizard/const.py +++ b/wizard/const.py @@ -24,4 +24,6 @@ CPU_DEF = { "CPU_DESC" : [] } -CPU_DEFINITION = "*.cdef" \ No newline at end of file +CPU_DEFINITION = "*.cdef" + +GCC_NAME = "*gcc*" \ No newline at end of file