code: def exec_scratch_virtualenv(args):
      
      scratch = Scratch()
      if not exists(scratch.python):
          run(('virtualenv', scratch.venv))
  
      if not exists(join(scratch.src, 'virtualenv.py')):
          scratch_python = venv_python(scratch.venv)
          # TODO: do we allow user-defined override of which version of virtualenv to install?
          tmp = scratch.src + '.tmp'
          run((scratch_python, '-m', 'pip.__main__', 'install', 'virtualenv', '--target', tmp))
  
          from os import rename
          rename(tmp, scratch.src)
  
      import sys
      from os.path import realpath
      # We want to compare the paths themselves as sometimes sys.path is the same
      # as scratch.venv, but with a suffix of bin/..
      if realpath(sys.prefix) != realpath(scratch.venv):
          # TODO-TEST: sometimes we would get a stale version of venv-update
          exec_((scratch.python, dotpy(__file__)) + args)  # never returns
  
      # TODO-TEST: the original venv-update's directory was on sys.path (when using symlinking)
      sys.path[0] = scratch.src
docs: goals:
          - get any random site-packages off of the pythonpath
          - ensure we can import virtualenv
          - ensure that we're not using the interpreter that we may need to delete
          - idempotency: do nothing if the above goals are already met