code: def finalize_options(self):
      self.set_undefined_options("bdist", ("bdist_base", "bdist_base"))
      if self.rpm_base is None:
          if not self.rpm3_mode:
              raise DistutilsOptionError(
                  "you must specify --rpm-base in RPM 2 mode"
              )
          self.rpm_base = os.path.join(self.bdist_base, "rpm")
  
      if self.python is None:
          if self.fix_python:
              self.python = sys.executable
          else:
              self.python = "python3"
      elif self.fix_python:
          raise DistutilsOptionError(
              "--python and --fix-python are mutually exclusive options"
          )
  
      if os.name != "posix":
          raise DistutilsPlatformError(
              "don't know how to create RPM "
              "distributions on platform %s" % os.name
          )
      if self.binary_only and self.source_only:
          raise DistutilsOptionError(
              "cannot supply both '--source-only' and '--binary-only'"
          )
  
      # don't pass CFLAGS to pure python distributions
      if not self.distribution.has_ext_modules():
          self.use_rpm_opt_flags = 0
  
      self.set_undefined_options("bdist", ("dist_dir", "dist_dir"))
      self.finalize_package_data()
  
file_path: catboost/contrib/tools/python3/src/Lib/distutils/command/bdist_rpm.py
imports: import subprocess, sys, os
  from distutils.core import Command
  from distutils.debug import DEBUG
  from distutils.file_util import write_file
  from distutils.errors import *
  from distutils.sysconfig import get_python_version
  from distutils import log
label_desc: Use image node_id 2 for calling the bdist_rpm obj's underlying member method code with example usage: obj.finalize_options() without return types