original_docstring:  Monkey patch for numpy build_src.build_src method
  
      Uses Cython instead of Pyrex.
  
      Assumes Cython is present
      
docstring: Monkey patch for numpy build_src.build_src method
  Uses Cython instead of Pyrex.
  
  Assumes Cython is present
docstring_tokens: Monkey patch for numpy build_src . build_src method Uses Cython instead of Pyrex . Assumes Cython is present
code: def generate_a_pyrex_source(self, base, ext_name, source, extension):
      ''' Monkey patch for numpy build_src.build_src method
  
      Uses Cython instead of Pyrex.
  
      Assumes Cython is present
      '''
      if self.inplace:
          target_dir = dirname(base)
      else:
          target_dir = appendpath(self.build_src, dirname(base))
      if extension.language == "c++":
          cplus = True
          file_ext = ".cpp"
      else:
          cplus = False
          file_ext = ".c"
      target_file = pjoin(target_dir, ext_name + file_ext)
      depends = [source] + extension.depends
      if self.force or newer_group(depends, target_file, 'newer'):
          import Cython.Compiler.Main
          log.info("cythonc:> %s" % (target_file))
          self.mkpath(target_dir)
          options = Cython.Compiler.Main.CompilationOptions(
              defaults=Cython.Compiler.Main.default_options,
              include_path=extension.include_dirs,
              cplus=cplus,
              output_file=target_file)
          cython_result = Cython.Compiler.Main.compile(source,
                                                       options=options)
          if cython_result.num_errors != 0:
              raise DistutilsError("%d errors while compiling %r with Cython"
                                   % (cython_result.num_errors, source))
      return target_file
code_tokens: def generate_a_pyrex_source ( self , base , ext_name , source , extension ) : if self . inplace : target_dir = dirname ( base ) else : target_dir = appendpath ( self . build_src , dirname ( base ) ) if extension . language == "c++" : cplus = True file_ext = ".cpp" else : cplus = False file_ext = ".c" target_file = pjoin ( target_dir , ext_name + file_ext ) depends = [ source ] + extension . depends if self . force or newer_group ( depends , target_file , 'newer' ) : import Cython . Compiler . Main log . info ( "cythonc:> %s" % ( target_file ) ) self . mkpath ( target_dir ) options = Cython . Compiler . Main . CompilationOptions ( defaults = Cython . Compiler . Main . default_options , include_path = extension . include_dirs , cplus = cplus , output_file = target_file ) cython_result = Cython . Compiler . Main . compile ( source , options = options ) if cython_result . num_errors != 0 : raise DistutilsError ( "%d errors while compiling %r with Cython" % ( cython_result . num_errors , source ) ) return target_file
short_docstring: Monkey patch for numpy build_src.build_src method
  Uses Cython instead of Pyrex.
short_docstring_tokens: Monkey patch for numpy build_src . build_src method Uses Cython instead of Pyrex .
comment: ''' Monkey patch for numpy build_src.build_src method
  
      Uses Cython instead of Pyrex.
  
      Assumes Cython is present
      '''