ffi/build.py
def compile_module(name, cdef, code, *args, **kwargs):
  "Compile an FFI module into a Python module"
  verbose = get_remove(kwargs, "verbose", False)
  tmpdir = get_remove(kwargs, "tmpdir", os.getcwd())
  ffibuilder = FFI()
  if cdef:
    ffibuilder.cdef(cdef)
  logger.debug("Compiling module {}:".format(name))
  logger.debug("Module cdefs:")
  for lnr, line in enumerate(cdef.splitlines()):
    if len(line.strip()) > 0:
      logger.debug("{:04d}\t{}".format(lnr, line))
  logger.debug("Module source:")
  for lnr, line in enumerate(code.splitlines()):
    if len(line.strip()) > 0:
      logger.debug("{:04d}\t{}".format(lnr, line))
  ffibuilder.set_source(name, code, *args, **kwargs)
  ffibuilder.compile(verbose=verbose, tmpdir=tmpdir)
Compile an FFI module into a Python module
Compile an FFI module into a Python module
Compile an FFI module into a Python module
def compile_module(name, cdef, code, *args, **kwargs):
  verbose = get_remove(kwargs, "verbose", False)
  tmpdir = get_remove(kwargs, "tmpdir", os.getcwd())
  ffibuilder = FFI()
  if cdef:
    ffibuilder.cdef(cdef)
  logger.debug("Compiling module {}:".format(name))
  logger.debug("Module cdefs:")
  for lnr, line in enumerate(cdef.splitlines()):
    if len(line.strip()) > 0:
      logger.debug("{:04d}\t{}".format(lnr, line))
  logger.debug("Module source:")
  for lnr, line in enumerate(code.splitlines()):
    if len(line.strip()) > 0:
      logger.debug("{:04d}\t{}".format(lnr, line))
  ffibuilder.set_source(name, code, *args, **kwargs)
  ffibuilder.compile(verbose=verbose, tmpdir=tmpdir)
def compile_module ( name , cdef , code , * args , ** kwargs ) : verbose = get_remove ( kwargs , "verbose" , False ) tmpdir = get_remove ( kwargs , "tmpdir" , os . getcwd ( ) ) ffibuilder = FFI ( ) if cdef : ffibuilder . cdef ( cdef ) logger . debug ( "Compiling module {}:" . format ( name ) ) logger . debug ( "Module cdefs:" ) for lnr , line in enumerate ( cdef . splitlines ( ) ) : if len ( line . strip ( ) ) > 0 : logger . debug ( "{:04d}\t{}" . format ( lnr , line ) ) logger . debug ( "Module source:" ) for lnr , line in enumerate ( code . splitlines ( ) ) : if len ( line . strip ( ) ) > 0 : logger . debug ( "{:04d}\t{}" . format ( lnr , line ) ) ffibuilder . set_source ( name , code , * args , ** kwargs ) ffibuilder . compile ( verbose = verbose , tmpdir = tmpdir )
Compile an FFI module into a Python module
Compile an FFI module into a Python module
"Compile an FFI module into a Python module"
name
cdef
code