docstr: Finalizes options for posix platforms.
docstr_tok: ["Finalizes","options","for","posix","platforms","."]
code: def finalize_unix(self):
      """Finalizes options for posix platforms."""
      if (
          self.install_base is not None
          or self.install_platbase is not None
      ):
          incomplete_scheme = (
              (
                  self.install_lib is None
                  and self.install_purelib is None
                  and self.install_platlib is None
              )
              or self.install_headers is None
              or self.install_scripts is None
              or self.install_data is None
          )
          if incomplete_scheme:
              raise DistutilsOptionError(
                  "install-base or install-platbase supplied, but "
                  "installation scheme is incomplete"
              )
          return
  
      if self.user:
          if self.install_userbase is None:
              raise DistutilsPlatformError(
                  "User base directory is not specified"
              )
          self.install_base = (
              self.install_platbase
          ) = self.install_userbase
          self.select_scheme("posix_user")
      elif self.home is not None:
          self.install_base = self.install_platbase = self.home
          self.select_scheme("posix_home")
      else:
          if self.prefix is None:
              if self.exec_prefix is not None:
                  raise DistutilsOptionError(
                      "must not supply exec-prefix without prefix"
                  )
  
              # Allow Fedora to add components to the prefix
              _prefix_addition = getattr(
                  sysconfig, "_prefix_addition", ""
              )
  
              self.prefix = (
                  os.path.normpath(sys.prefix) + _prefix_addition
              )
              self.exec_prefix = (
                  os.path.normpath(sys.exec_prefix) + _prefix_addition
              )
  
          else:
              if self.exec_prefix is None:
                  self.exec_prefix = self.prefix
  
          self.install_base = self.prefix
          self.install_platbase = self.exec_prefix
          self.select_scheme("posix_prefix")
  
imports: import sys
  import os
  import contextlib
  import sysconfig
  import itertools
  from distutils._log import log
  from ..core import Command
  from ..debug import DEBUG
  from ..sysconfig import get_config_vars
  from ..file_util import write_file
  from ..util import convert_path, subst_vars, change_root
  from ..util import get_platform
  from ..errors import DistutilsOptionError, DistutilsPlatformError
  from .None import _framework_compat
  from ..None import _collections
  from site import USER_BASE
  from site import USER_SITE
label_desc: Use image node_id 4 for calling the install obj's underlying member method code with example usage: obj.finalize_unix() without return types