#NEWLINE# def compile_cmodule( self , location = None ) : #NEWLINE# #INDENT# '\n        This compiles the source code for this linker and returns a\n        loaded module.\n\n        ' #NEWLINE# if ( location is None ) : #NEWLINE# #INDENT# location = cmodule . dlimport_workdir ( config . compiledir ) #NEWLINE# #UNINDENT# mod = self . get_dynamic_module ( ) #NEWLINE# c_compiler = self . c_compiler ( ) #NEWLINE# libs = self . libraries ( ) #NEWLINE# preargs = self . compile_args ( ) #NEWLINE# src_code = mod . code ( ) #NEWLINE# get_lock ( ) #NEWLINE# try : #NEWLINE# #INDENT# _logger . debug ( 'LOCATION %s' , str ( location ) ) #NEWLINE# module = c_compiler . compile_str ( module_name = mod . code_hash , src_code = src_code , location = location , include_dirs = self . header_dirs ( ) , lib_dirs = self . lib_dirs ( ) , libs = libs , preargs = preargs ) #NEWLINE# #UNINDENT# except Exception as e : #NEWLINE# #INDENT# e . args += ( str ( self . fgraph ) , ) #NEWLINE# raise #NEWLINE# #UNINDENT# finally : #NEWLINE# #INDENT# release_lock ( ) #NEWLINE# #UNINDENT# return module