1 | initial version |
There is no way to customize just SAGE_TMP, though you can customize ~/.sage by setting DOT_SAGE. You can see from the source code at https://github.com/sagemath/sage/blob/master/src/sage/misc/misc.py#L225 that SAGE_TMP is hardcoded as a function of the hostname and pid. I vaguely recall writing this code 13 years ago to avoid conflicts when running multiple copies of Sage. It seems pretty annoying now, and it could easily lead to ~/.sage/temp getting really big if Sage keeps crashing, whereas often /tmp on systems gets automatically cleaned up (at least on reboot). Also, /tmp is often on a much faster filesystem than ~/.sage (which might be mounted over NFS). Sigh. I hope somebody changes this.