original_docstring: Creates a temporary directory and copy the whole installation directory (pack_dir), under the prefix designated by install_prefix.
      Also writes updated rc files (shell scripts for setting the environment), and a version file.
      Returns a list with the temporary directory created and the full path of the temporary directory and the appended install_prefix.
docstring: Creates a temporary directory and copy the whole installation directory (pack_dir), under the prefix designated by install_prefix.
  Also writes updated rc files (shell scripts for setting the environment), and a version file.
  Returns a list with the temporary directory created and the full path of the temporary directory and the appended install_prefix.
docstring_tokens: Creates a temporary directory and copy the whole installation directory ( pack_dir ) under the prefix designated by install_prefix . Also writes updated rc files ( shell scripts for setting the environment ) and a version file . Returns a list with the temporary directory created and the full path of the temporary directory and the appended install_prefix .
code: def create_dist(pack_dir, install_prefix, version, gitrev):
      '''Creates a temporary directory and copy the whole installation directory (pack_dir), under the prefix designated by install_prefix.
      Also writes updated rc files (shell scripts for setting the environment), and a version file.
      Returns a list with the temporary directory created and the full path of the temporary directory and the appended install_prefix.'''
      global temp_dirs
      temp_dir = tempfile.mkdtemp(prefix = "p4a_pack_")
      temp_dirs.append(temp_dir)
      p4a_util.debug("Temp dir is " + temp_dir)
      temp_dir_with_prefix = os.path.join(temp_dir, install_prefix)
      os.makedirs(os.path.split(temp_dir_with_prefix)[0])
      p4a_util.info("Copying " + pack_dir + " to " + temp_dir_with_prefix)
      p4a_util.run([ "cp", "-av", pack_dir + "/", temp_dir_with_prefix ])
      abs_prefix = "/" + install_prefix
  
      p4a_rc.p4a_write_rc(os.path.join(temp_dir_with_prefix, "etc"),
          dict(
              root = abs_prefix,
              dist = abs_prefix,
              accel = "share/p4a_accel",
              scmp = "share/p4a_scmp",
              astrad = "share/p4a_astrad",
              fortran = "gfortran" # ???
          )
      )
  
      p4a_version.write_VERSION(temp_dir_with_prefix, version)
      p4a_version.write_GITREV(temp_dir_with_prefix, gitrev)
  
      return [ temp_dir, temp_dir_with_prefix ]
code_tokens: def create_dist ( pack_dir , install_prefix , version , gitrev ) : global temp_dirs temp_dir = tempfile . mkdtemp ( prefix = "p4a_pack_" ) temp_dirs . append ( temp_dir ) p4a_util . debug ( "Temp dir is " + temp_dir ) temp_dir_with_prefix = os . path . join ( temp_dir , install_prefix ) os . makedirs ( os . path . split ( temp_dir_with_prefix ) [ 0 ] ) p4a_util . info ( "Copying " + pack_dir + " to " + temp_dir_with_prefix ) p4a_util . run ( [ "cp" , "-av" , pack_dir + "/" , temp_dir_with_prefix ] ) abs_prefix = "/" + install_prefix p4a_rc . p4a_write_rc ( os . path . join ( temp_dir_with_prefix , "etc" ) , dict ( root = abs_prefix , dist = abs_prefix , accel = "share/p4a_accel" , scmp = "share/p4a_scmp" , astrad = "share/p4a_astrad" , fortran = "gfortran" ) ) p4a_version . write_VERSION ( temp_dir_with_prefix , version ) p4a_version . write_GITREV ( temp_dir_with_prefix , gitrev ) return [ temp_dir , temp_dir_with_prefix ]
short_docstring: Creates a temporary directory and copy the whole installation directory (pack_dir), under the prefix designated by install_prefix.
short_docstring_tokens: Creates a temporary directory and copy the whole installation directory ( pack_dir ) under the prefix designated by install_prefix .
comment: '''Creates a temporary directory and copy the whole installation directory (pack_dir), under the prefix designated by install_prefix.
      Also writes updated rc files (shell scripts for setting the environment), and a version file.
      Returns a list with the temporary directory created and the full path of the temporary directory and the appended install_prefix.'''$SEP$# ???