コード例 #1
0
ファイル: ctx_depmgr.py プロジェクト: arnognulf/contexo
 def findAllCodeModulePaths( self, searchPaths ):
     from ctx_cmod import isContexoCodeModule, CTXRawCodeModule
 
     searchPaths = assureList ( searchPaths )
 
     pathList = list ()
     for path in searchPaths:
         codeModulePaths = []
 
         if len(codeModulePaths) == 0:
             try:
                 pathCandidates = os.listdir( path )
             except OSError, (errno,  errmsg):
                 userErrorExit("Could not list directory '%s': %s"%(path,  errmsg))
             for cand in pathCandidates:
                 candPath = os.path.join( path, cand )
                 if isContexoCodeModule( candPath ) == True:
                     emptyPathList = list()
                     unitTestDummyValue = False
                     mod = CTXRawCodeModule(candPath, emptyPathList, unitTestDummyValue, self.archPath, self.legacyCompilingMod, self.globalOutputDir,bc = self.bc)
                     codeModulePaths.append( mod.getPubHeaderDir() )
                     codeModulePaths.append( mod.getPrivHeaderDir() )
                     codeModulePaths.append( mod.getSourceDir () )
                     codeModulePaths.append( mod.getTestDir () )
         pathList.extend( codeModulePaths )
コード例 #2
0
ファイル: ctx_depmgr.py プロジェクト: mikester/contexo
    def addCodeModules( self, codeModulePaths, unitTests = False ):
        from ctx_cmod import CTXRawCodeModule

        codeModulePaths = assureList(codeModulePaths)

        #
        # Append CTXRawCodeModule objects for all given modules.
        #
        for mod in codeModulePaths:

            modPath = self.resolveCodeModulePath( mod )

            rawmod = CTXRawCodeModule(modPath, buildUnitTests = unitTests)
            self.cmods[rawmod.getName()] = rawmod

        self.needUpdate = True
コード例 #3
0
ファイル: ctx_depmgr.py プロジェクト: arnognulf/contexo
    def addCodeModules( self, codeModulePaths, unitTests = False ):
        from ctx_cmod import CTXRawCodeModule

        codeModulePaths = assureList(codeModulePaths)

        #
        # Append CTXRawCodeModule objects for all given modules.
        #
        for mod in codeModulePaths:

            modPath = self.resolveCodeModulePath( mod )

            emptyPathList = list()
            rawmod = CTXRawCodeModule(modPath, emptyPathList, unitTests, self.archPath, self.legacyCompilingMod, self.globalOutputDir, bc = self.bc)
            self.cmods[rawmod.getName()] = rawmod

        self.needUpdate = True
コード例 #4
0
    def addCodeModules( self, codeModulePaths, unitTests = False ):
        from ctx_cmod import CTXRawCodeModule

        codeModulePaths = assureList(codeModulePaths)

        #
        # Append CTXRawCodeModule objects for all given modules.
        #
        for mod in codeModulePaths:

            modPath = self.resolveCodeModulePath( mod )

            #def __init__( self, moduleRoot, pathlist = None, buildUnitTests = False , archPath = list()):
            emptyPathList = list()
            rawmod = CTXRawCodeModule(modPath, emptyPathList, unitTests, self.archPath, self.legacyCompilingMod)
            self.cmods[rawmod.getName()] = rawmod

        self.needUpdate = True
コード例 #5
0
ファイル: ctx_depmgr.py プロジェクト: mikester/contexo
def findAllCodeModulPaths( searchPaths ):
    from ctx_cmod import isContexoCodeModule, CTXRawCodeModule

    searchPaths = assureList ( searchPaths )

    pathList = list ()
    for path in searchPaths:
        codeModulePaths = []

        if len(codeModulePaths) == 0:
            try:
                pathCandidates = os.listdir( path )
            except OSError, (errno,  errmsg):
                userErrorExit("Could not list directory '%s': %s"%(path,  errmsg))
            for cand in pathCandidates:
                candPath = os.path.join( path, cand )
                if isContexoCodeModule( candPath ) == True:
                    mod = CTXRawCodeModule(candPath)
                    codeModulePaths.append( mod.getPubHeaderDir() )
                    codeModulePaths.append( mod.getPrivHeaderDir() )
                    codeModulePaths.append( mod.getSourceDir () )
                    codeModulePaths.append( mod.getTestDir () )
        pathList.extend( codeModulePaths )