Skip to content

Commit 4830c77

Browse files
committed
Modify the sage script so it sets SAGE_ROOT and SAGE_LOCAL correctly.
1 parent 62d27b4 commit 4830c77

File tree

1 file changed

+23
-19
lines changed
  • Sage_framework/files

1 file changed

+23
-19
lines changed

Sage_framework/files/sage

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -203,25 +203,29 @@ usage() {
203203
# below, after sourcing sage-env.
204204

205205
# Determine SAGE_ROOT, SAGE_LOCAL, and SAGE_VENV.
206-
unset SAGE_VENV
207-
if [ -x "${SELF}-config" ]; then
208-
# optional sage-config console script, installed by sage_conf
209-
export SAGE_ROOT=$("${SELF}-config" SAGE_ROOT)
210-
export SAGE_LOCAL=$("${SELF}-config" SAGE_LOCAL)
211-
fi
212-
if [ -f "${SELF}-src-env-config" ]; then
213-
# Not installed script, present only in src/bin/
214-
SAGE_SRC_ENV_CONFIG=1
215-
. "${SELF}-src-env-config" >&2
216-
fi
217-
if [ -z "$SAGE_VENV" -a -x "${SELF}-venv-config" ]; then
218-
# installed by setup.py
219-
export SAGE_VENV=$("${SELF}-venv-config" SAGE_VENV)
220-
fi
221-
if [ -f "${SELF}-env-config" ]; then
222-
# As of Issue #22731, sage-env-config is optional.
223-
. "${SELF}-env-config" >&2
224-
fi
206+
export SAGE_ROOT="${SAGE_SYMLINK}"
207+
export SAGE_LOCAL="${SAGE_ROOT}/local"
208+
export SAGE_VENV="${SAGE_ROOT}/local"
209+
210+
# unset SAGE_VENV
211+
# if [ -x "${SELF}-config" ]; then
212+
# # optional sage-config console script, installed by sage_conf
213+
# export SAGE_ROOT=$("${SELF}-config" SAGE_ROOT)
214+
# export SAGE_LOCAL=$("${SELF}-config" SAGE_LOCAL)
215+
# fi
216+
# if [ -f "${SELF}-src-env-config" ]; then
217+
# # Not installed script, present only in src/bin/
218+
# SAGE_SRC_ENV_CONFIG=1
219+
# . "${SELF}-src-env-config" >&2
220+
# fi
221+
# if [ -z "$SAGE_VENV" -a -x "${SELF}-venv-config" ]; then
222+
# # installed by setup.py
223+
# export SAGE_VENV=$("${SELF}-venv-config" SAGE_VENV)
224+
# fi
225+
# if [ -f "${SELF}-env-config" ]; then
226+
# # As of Issue #22731, sage-env-config is optional.
227+
# . "${SELF}-env-config" >&2
228+
# fi
225229

226230
#####################################################################
227231
# Special options to be processed without sage-env

0 commit comments

Comments
 (0)