예제 #1
0
    def resolveCodeModulePath(self, mod):
        import ctx_cmod

        modPath = mod

        # if not os.path.exists( modPath ):
        for path in self.depRoots:
            modPath = os.path.join(path, mod)
            if os.path.exists(modPath):
                if ctx_cmod.isContexoCodeModule(modPath):
                    break
                else:
                    infoMessage(
                        "Ignoring directory %s since it is not a valid contexo module: no folder named 'contexo', 'doc', 'src', 'test', 'inc' nor header files found."
                        % modPath,
                        3,
                    )
            else:
                modPath = str()

        if len(modPath) == 0:
            userErrorExit("Unable to locate code module: '%s'" % mod)

        ctx_cmod.assertValidContexoCodeModule(modPath, self.msgSender)

        return modPath
예제 #2
0
    def resolveCodeModulePath( self, mod ):
        import ctx_cmod

        modPath = mod

        #if not os.path.exists( modPath ):
        for path in self.depRoots:
            modPath = os.path.join( path, mod )
            if os.path.exists( modPath ):
                if ctx_cmod.isContexoCodeModule(modPath):
                    break
                else:
                    infoMessage( "Directory %s is not a valid contexo module, ignoring"%modPath,  3  )
            else:
                modPath = str()

        if len(modPath) == 0:
            userErrorExit("Unable to locate code module: '%s'"%mod)

        ctx_cmod.assertValidContexoCodeModule( modPath, self.msgSender )

        return modPath