code: def run():
      """
      Dump on stdout the config flags required to compile pythran-generated code.
      """
      import argparse
      import setuptools
      import distutils.ccompiler
      import distutils.sysconfig
      import pythran
      import numpy
  
      parser = argparse.ArgumentParser(
          prog="pythran-config",
          description="output build options for pythran-generated code",
          epilog="It's a megablast!",
      )
  
      parser.add_argument(
          "--compiler",
          action="store_true",
          help="print default compiler",
      )
  
      parser.add_argument(
          "--cflags",
          action="store_true",
          help="print compilation flags",
      )
  
      parser.add_argument(
          "--libs", action="store_true", help="print linker flags"
      )
  
      parser.add_argument(
          "--no-python",
          action="store_true",
          help="do not include Python-related flags",
      )
  
      parser.add_argument(
          "--verbose",
          "-v",
          action="count",
          default=0,
          help=(
              "verbose mode: [-v] prints warnings if pythranrc "
              "has an invalid configuration; use "
              "[-vv] for more information"
          ),
      )
  
      args = parser.parse_args(sys.argv[1:])
  
      args.python = not args.no_python
  
      output = []
  
      extension = pythran.config.make_extension(python=args.python)
  
      if args.verbose >= 1:
          if args.verbose == 1:
              logger.setLevel(logging.WARNING)
          else:
              logger.setLevel(logging.INFO)
  
          lint_cfg(cfg)
  
      if args.compiler or args.verbose >= 2:
          cxx = compiler() or "c++"
          logger.info("CXX = ".rjust(10) + cxx)
          if args.compiler:
              output.append(cxx)
  
      compiler_obj = distutils.ccompiler.new_compiler()
      distutils.sysconfig.customize_compiler(compiler_obj)
  
      if args.cflags or args.verbose >= 2:
  
          def fmt_define(define):
              name, value = define
              if value is None:
                  return "-D" + name
              else:
                  return "-D" + name + "=" + value
  
          cflags = []
          cflags.extend(
              fmt_define(define)
              for define in extension["define_macros"]
          )
          cflags.extend(
              ("-I" + include) for include in extension["include_dirs"]
          )
          if args.python:
              cflags.append("-I" + numpy.get_include())
              cflags.append("-I" + distutils.sysconfig.get_python_inc())
  
          logger.info("CXXFLAGS = ".rjust(10) + " ".join(cflags))
          if args.cflags:
              output.extend(cflags)
  
      if args.libs or args.verbose >= 2:
          ldflags = []
          ldflags.extend(
              (compiler_obj.library_dir_option(include))
              for include in extension["library_dirs"]
          )
          ldflags.extend(
              (compiler_obj.library_option(include))
              for include in extension["libraries"]
          )
  
          if args.python:
              libpl = distutils.sysconfig.get_config_var("LIBPL")
              if libpl:
                  ldflags.append(libpl)
              libs = distutils.sysconfig.get_config_var("LIBS")
              if libs:
                  ldflags.extend(shsplit(libs))
              ldflags.append(
                  compiler_obj.library_option("python")
                  + distutils.sysconfig.get_config_var("VERSION")
              )
  
          logger.info("LDFLAGS = ".rjust(10) + " ".join(ldflags))
          if args.libs:
              output.extend(ldflags)
  
      if output:
          print(" ".join(output))
  
file_path: catboost/contrib/python/pythran/pythran/config.py
imports: import io
  import logging
  import os
  from shlex import split
  import sys
  import numpy
label_desc: Use image node_id 8 for calling a global function with example usage: run() and returns: unknown, unknown