Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trac #25486: Discover SAGE_SCRIPTS_DIR to make $SAGE_LOCAL/bin/sage w…
…ork from any directory, in an environment without SAGE_* variables This ticket makes `$SAGE_LOCAL/bin/sage` work without environment variables set, or the current working directory to be something particular. It does that by - adding `SAGE_ROOT` to `$SAGE_LOCAL/bin/sage-env-config` (via `src/bin /sage-env-config.in`). - adding code to the top of `sage-env` that determines `SAGE_SCRIPTS_DIR` from the directory of itself. ------ Previous discussion in https://groups.google.com/d/msg/sage- devel/oODph9-yjaI/FVeBsCk_CgAJ: On Wednesday, May 30, 2018 at 9:01:59 AM UTC-7, Nils Bruin wrote: Currently, if I run the script $SAGE_LOCAL/bin/sage in my normal environment (where SAGE_ROOT is not set) then I get: Error: You must set the SAGE_ROOT environment variable or run this script from the SAGE_ROOT or SAGE_ROOT/local/bin/ directory. Error setting environment variables by sourcing '/usr/local/sage/sage- git/local/bin/sage-env'; possibly contact sage-devel (see http://groups.google.com/group/sage- devel). If instead I run the script $SAGE_ROOT/sage a value for SAGE_ROOT is figured out and everything works fine when called from my normal environment. URL: https://trac.sagemath.org/25486 Reported by: mkoeppe Ticket author(s): Matthias Koeppe Reviewer(s): Dima Pasechnik
- Loading branch information