code: def run(self):  # noqa: C901
      from ..ccompiler import new_compiler
  
      # 'self.extensions', as supplied by setup.py, is a list of
      # Extension instances.  See the documentation for Extension (in
      # distutils.extension) for details.
      #
      # For backwards compatibility with Distutils 0.8.2 and earlier, we
      # also allow the 'extensions' list to be a list of tuples:
      #    (ext_name, build_info)
      # where build_info is a dictionary containing everything that
      # Extension instances do except the name, with a few things being
      # differently named.  We convert these 2-tuples to Extension
      # instances as needed.
  
      if not self.extensions:
          return
  
      # If we were asked to build any C/C++ libraries, make sure that the
      # directory where we put them is in the library search path for
      # linking extensions.
      if self.distribution.has_c_libraries():
          build_clib = self.get_finalized_command("build_clib")
          self.libraries.extend(build_clib.get_library_names() or [])
          self.library_dirs.append(build_clib.build_clib)
  
      # Setup the CCompiler object that we'll use to do all the
      # compiling and linking
      self.compiler = new_compiler(
          compiler=self.compiler,
          verbose=self.verbose,
          dry_run=self.dry_run,
          force=self.force,
      )
      customize_compiler(self.compiler)
      # If we are cross-compiling, init the compiler now (if we are not
      # cross-compiling, init would not hurt, but people may rely on
      # late initialization of compiler even if they shouldn't...)
      if os.name == "nt" and self.plat_name != get_platform():
          self.compiler.initialize(self.plat_name)
  
      # And make sure that any compile/link-related options (which might
      # come from the command-line or from the setup script) are set in
      # that CCompiler object -- that way, they automatically apply to
      # all compiling and linking done here.
      if self.include_dirs is not None:
          self.compiler.set_include_dirs(self.include_dirs)
      if self.define is not None:
          # 'define' option is a list of (name,value) tuples
          for name, value in self.define:
              self.compiler.define_macro(name, value)
      if self.undef is not None:
          for macro in self.undef:
              self.compiler.undefine_macro(macro)
      if self.libraries is not None:
          self.compiler.set_libraries(self.libraries)
      if self.library_dirs is not None:
          self.compiler.set_library_dirs(self.library_dirs)
      if self.rpath is not None:
          self.compiler.set_runtime_library_dirs(self.rpath)
      if self.link_objects is not None:
          self.compiler.set_link_objects(self.link_objects)
  
      # Now actually compile and link everything.
      self.build_extensions()
  
imports: import contextlib
  import os
  import re
  import sys
  from ..core import Command
  from ..errors import DistutilsOptionError, DistutilsSetupError, CCompilerError, DistutilsError, CompileError, DistutilsPlatformError
  from ..sysconfig import customize_compiler, get_python_version
  from ..sysconfig import get_config_h_filename
  from .._modified import newer_group
  from ..extension import Extension
  from ..util import get_platform
  from distutils._log import log
  from .None import py37compat
  from site import USER_BASE
label_desc: Use image node_id 3 for calling the build_ext obj's underlying member method code with example usage: obj.run() without return types