Skip to main content
`Ctrl`+`K`

# numpy.distutils.ccompiler.CCompiler_compile

distutils.ccompiler.CCompiler_compile(self, sources, output_dir=None, macros=None, include_dirs=None, debug=0, extra_preargs=None, extra_postargs=None, depends=None)

  Compile one or more source files.

  Please refer to the Python distutils API reference for more details.

  Parameters:
    sources list of str

      A list of filenames

    output_dir str, optional

      Path to the output directory.

    macros list of tuples

      A list of macro definitions.

    include_dirs list of str, optional

      The directories to add to the default include file search path for this compilation only.

    debug bool, optional

      Whether or not to output debug symbols in or alongside the object file(s).

    extra_preargs, extra_postargs?

      Extra pre- and post-arguments.

    depends list of str, optional

      A list of file names that all targets depend on.

  Returns:
    objects list of str

      A list of object file names, one per source file sources.

  Raises:
    CompileError

      If compilation fails.