class_docstr: Conditionally complement the setup.cfg options file.
  
  This class configures the include_dirs, library_dirs, libraries
  options as required by the system. Most of the configuration happens
  in finalize_options() method.
  
  If you want to set up the build step for a peculiar platform, add a
  method finalize_PLAT(), where PLAT matches your sys.platform.
code: def build_extension(self, extension):
      # Count files compiled to print the binary blurb only if the first fails
      compile_orig = getattr(self.compiler, "_compile", None)
      if compile_orig is not None:
  
          def _compile(*args, **kwargs):
              rv = compile_orig(*args, **kwargs)
              psycopg_build_ext.built_files += 1
              return rv
  
          self.compiler._compile = _compile
  
      try:
          build_ext.build_extension(self, extension)
          psycopg_build_ext.built_files += 1
      except CompileError:
          if self.built_files == 0:
              sys.stderr.write(
                  """
  It appears you are missing some prerequisite to build the package from source.
  
  You may install a binary package by installing 'psycopg2-binary' from PyPI.
  If you want to install psycopg2 from source, please install the packages
  required for the build and try again.
  
  For further information please check the 'doc/src/install.rst' file (also at
  <https://www.psycopg.org/docs/install.html>).
  
  """
              )
          raise
  
imports: import os
  import sys
  import re
  import subprocess
  from setuptools import setup, Extension
  from distutils.command.build_ext import build_ext
  from distutils.ccompiler import get_default_compiler
  from distutils.errors import CompileError
  import configparser
label_desc: Use image node_id 7 for calling the psycopg_build_ext obj's underlying member method code with example usage: obj.build_extension(extension) and returns: rv