class_docstr: This class exists to allow virtual environment creation to be
  customized. The constructor parameters determine the builder's
  behaviour when called upon to create a virtual environment.
  
  By default, the builder makes the system (global) site-packages dir
  *un*available to the created environment.
  
  If invoked using the Python -m option, the default is to use copying
  on Windows platforms but symlinks elsewhere. If instantiated some
  other way, the default is to *not* use symlinks.
  
  :param system_site_packages: If True, the system (global) site-packages
                               dir is available to created environments.
  :param clear: If True, delete the contents of the environment directory if
                it already exists, before environment creation.
  :param symlinks: If True, attempt to symlink rather than copy files into
                   virtual environment.
  :param upgrade: If True, upgrade an existing virtual environment.
  :param with_pip: If True, ensure pip is installed in the virtual
                   environment
  :param prompt: Alternative terminal prefix for the environment.
  :param upgrade_deps: Update the base venv modules to the latest on PyPI
  :param scm_ignore_files: Create ignore files for the SCMs specified by the
                           iterable.
docstr: Set up a Python executable in the environment.
  
  :param context: The information for the environment creation request
                  being processed.
docstr_tok: ["Set","up","a","Python","executable","in","the","environment",".",":","param","context",":","The","information","for","the","environment","creation","request","being","processed","."]
code: def setup_python(self, context):
      """
      Set up a Python executable in the environment.
  
      :param context: The information for the environment creation request
                      being processed.
      """
      binpath = context.bin_path
      path = context.env_exe
      copier = self.symlink_or_copy
      dirname = context.python_dir
      if os.name != "nt":
          copier(context.executable, path)
          if not os.path.islink(path):
              os.chmod(path, 0o755)
          for suffix in (
              "python",
              "python3",
              f"python3.{sys.version_info[1]}",
          ):
              path = os.path.join(binpath, suffix)
              if not os.path.exists(path):
                  # Issue 18807: make copies if
                  # symlinks are not wanted
                  copier(
                      context.env_exe, path, relative_symlinks_ok=True
                  )
                  if not os.path.islink(path):
                      os.chmod(path, 0o755)
      else:
          if self.symlinks:
              # For symlinking, we need a complete copy of the root directory
              # If symlinks fail, you'll get unnecessary copies of files, but
              # we assume that if you've opted into symlinks on Windows then
              # you know what you're doing.
              suffixes = [
                  f
                  for f in os.listdir(dirname)
                  if os.path.normcase(os.path.splitext(f)[1])
                  in (".exe", ".dll")
              ]
              if sysconfig.is_python_build():
                  suffixes = [
                      f
                      for f in suffixes
                      if os.path.normcase(f).startswith(
                          ("python", "vcruntime")
                      )
                  ]
          else:
              suffixes = {
                  "python.exe",
                  "python_d.exe",
                  "pythonw.exe",
                  "pythonw_d.exe",
              }
              base_exe = os.path.basename(context.env_exe)
              suffixes.add(base_exe)
  
          for suffix in suffixes:
              src = os.path.join(dirname, suffix)
              if os.path.lexists(src):
                  copier(src, os.path.join(binpath, suffix))
  
          if sysconfig.is_python_build():
              # copy init.tcl
              for root, dirs, files in os.walk(context.python_dir):
                  if "init.tcl" in files:
                      tcldir = os.path.basename(root)
                      tcldir = os.path.join(
                          context.env_dir, "Lib", tcldir
                      )
                      if not os.path.exists(tcldir):
                          os.makedirs(tcldir)
                      src = os.path.join(root, "init.tcl")
                      dst = os.path.join(tcldir, "init.tcl")
                      shutil.copyfile(src, dst)
                      break
  
imports: import logging
  import os
  import shutil
  import subprocess
  import sys
  import sysconfig
  import types
label_desc: Use image node_id 8 for calling the EnvBuilder obj's underlying member method code with example usage: obj.setup_python(context) without return types