-
-
Notifications
You must be signed in to change notification settings - Fork 655
Description
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
(viasrc/bin/sage-env-config.in
). - adding code to the top of
sage-env
that determinesSAGE_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.
CC: @jdemeyer @nbruin @embray @kiwifb @EmmanuelCharpentier @tobihan @saraedum @slel @timokau @dimpase
Component: build
Keywords: SAGE_LOCAL, SAGE_ROOT
Author: Matthias Koeppe
Branch: 4415da5
Reviewer: Dima Pasechnik
Issue created by migration from https://trac.sagemath.org/ticket/25486