class_docstr: Concrete class that implements an interface to the Borland C/C++
  compiler, as defined by the CCompiler abstract class.
code: def compile(  # noqa: C901
      self,
      sources,
      output_dir=None,
      macros=None,
      include_dirs=None,
      debug=0,
      extra_preargs=None,
      extra_postargs=None,
      depends=None,
  ):
      (
          macros,
          objects,
          extra_postargs,
          pp_opts,
          build,
      ) = self._setup_compile(
          output_dir,
          macros,
          include_dirs,
          sources,
          depends,
          extra_postargs,
      )
      compile_opts = extra_preargs or []
      compile_opts.append("-c")
      if debug:
          compile_opts.extend(self.compile_options_debug)
      else:
          compile_opts.extend(self.compile_options)
  
      for obj in objects:
          try:
              src, ext = build[obj]
          except KeyError:
              continue
          # XXX why do the normpath here?
          src = os.path.normpath(src)
          obj = os.path.normpath(obj)
          # XXX _setup_compile() did a mkpath() too but before the normpath.
          # Is it possible to skip the normpath?
          self.mkpath(os.path.dirname(obj))
  
          if ext == ".res":
              # This is already a binary file -- skip it.
              continue  # the 'for' loop
          if ext == ".rc":
              # This needs to be compiled to a .res file -- do it now.
              try:
                  self.spawn(["brcc32", "-fo", obj, src])
              except DistutilsExecError as msg:
                  raise CompileError(msg)
              continue  # the 'for' loop
  
          # The next two are both for the real compiler.
          if ext in self._c_extensions:
              input_opt = ""
          elif ext in self._cpp_extensions:
              input_opt = "-P"
          else:
              # Unknown file type -- no extra options.  The compiler
              # will probably fail, but let it just in case this is a
              # file the compiler recognizes even if we don't.
              input_opt = ""
  
          output_opt = "-o" + obj
  
          # Compiler command line syntax is: "bcc32 [options] file(s)".
          # Note that the source file names must appear at the end of
          # the command line.
          try:
              self.spawn(
                  [self.cc]
                  + compile_opts
                  + pp_opts
                  + [input_opt, output_opt]
                  + extra_postargs
                  + [src]
              )
          except DistutilsExecError as msg:
              raise CompileError(msg)
  
      return objects
  
file_path: catboost/contrib/python/setuptools/py3/setuptools/_distutils/bcppcompiler.py
imports: import os
  import warnings
  from .errors import DistutilsExecError, CompileError, LibError, LinkError, UnknownFileError
  from .ccompiler import CCompiler, gen_preprocess_options
  from .file_util import write_file
  from ._modified import newer
  from ._log import log
label_desc: Use image node_id 2 for calling the BCPPCompiler obj's underlying member method code with example usage: obj.compile(sources, output_dir, macros, include_dirs, debug, extra_preargs, extra_postargs, depends) and returns: objects