code: def build_libraries(self, libraries):
      for lib_name, build_info in libraries:
          sources = build_info.get("sources")
          if sources is None or not isinstance(sources, (list, tuple)):
              raise DistutilsSetupError(
                  "in 'libraries' option (library '%s'), "
                  "'sources' must be present and must be "
                  "a list of source filenames" % lib_name
              )
          sources = list(sources)
  
          log.info("building '%s' library", lib_name)
  
          # First, compile the source code to object files in the library
          # directory.  (This should probably change to putting object
          # files in a temporary build directory.)
          macros = build_info.get("macros")
          include_dirs = build_info.get("include_dirs")
          objects = self.compiler.compile(
              sources,
              output_dir=self.build_temp,
              macros=macros,
              include_dirs=include_dirs,
              debug=self.debug,
          )
  
          # Now "link" the object files together into a static library.
          # (On Unix at least, this isn't really linking -- it just
          # builds an archive.  Whatever.)
          self.compiler.create_static_lib(
              objects,
              lib_name,
              output_dir=self.build_clib,
              debug=self.debug,
          )
  
file_path: catboost/contrib/python/setuptools/py3/setuptools/_distutils/command/build_clib.py
imports: import os
  from ..core import Command
  from ..errors import DistutilsSetupError
  from ..sysconfig import customize_compiler
  from distutils._log import log
label_desc: Use image node_id 7 for calling the build_clib obj's underlying member method code with example usage: obj.build_libraries(libraries) without return types