/usr/share/sagemath/bin/sage-env is in sagemath-common 7.4-9.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | #!/bin/bash
if [[ -z ${SAGE_ROOT} ]]; then
export SAGE_ROOT="/usr/share/sagemath"
fi
if [[ -z ${SAGE_LOCAL} ]]; then
export SAGE_LOCAL="/usr"
fi
if [[ -z ${SAGE_DATA} ]]; then
export SAGE_DATA="/usr/share/sagemath"
fi
if [[ -z ${SAGE_SHARE} ]]; then
export SAGE_SHARE="/usr/share/sagemath"
fi
if [[ -z ${SAGE_DOC} ]]; then
export SAGE_DOC="/usr/share/doc/sagemath"
fi
if [[ -z ${SAGE_DOC_SRC} ]]; then
if [[ -n ${SAGE_SRC} ]]; then
export SAGE_DOC_SRC="$SAGE_SRC/doc"
fi
fi
if [[ -z ${SAGE_EXTCODE} ]]; then
export SAGE_EXTCODE="/usr/share/sagemath/ext"
fi
if [[ -z ${SAGE_SPKG_INST} ]]; then
export SAGE_SPKG_INST="/usr/share/sagemath/installed"
fi
if [[ -z ${SAGE_SCRIPTS_DIR} ]]; then
export SAGE_SCRIPTS_DIR="/usr/share/sagemath/bin"
fi
if [[ -z ${DOT_SAGE} ]]; then
export DOT_SAGE="${HOME}/.sage"
fi
if [ "$SAGE_STARTUP_FILE" = "" ]; then
export SAGE_STARTUP_FILE="${DOT_SAGE}/init.sage"
fi
if [[ -z ${SAGE_TESTDIR} ]]; then
export SAGE_TESTDIR="${DOT_SAGE}/tmp"
fi
if [[ -z ${SAGE_SERVER} ]]; then
export SAGE_SERVER="http://www.sagemath.org/"
fi
if [ -z "$SAGE_RC_FILE" ]; then
SAGE_RC_FILE="$DOT_SAGE/sagerc"
fi
if [ -r "$SAGE_RC_FILE" ]; then
source "$SAGE_RC_FILE"
if [ $? -ne 0 ]; then
echo >&2 "Error sourcing $SAGE_RC_FILE"
exit 1
fi
fi
export EPYTHON=python2.7
export MPMATH_NOGMPY=1
export PATH="$PATH:$SAGE_SCRIPTS_DIR"
GP_DATA_DIR="/usr/share/pari" && export GP_DATA_DIR
GPHELP="/usr/bin/gphelp" && export GPHELP
GPDOCDIR="/usr/share/pari/doc" && export GPDOCDIR
SINGULARPATH="/usr/share/singular" && export SINGULARPATH
SINGULAR_EXECUTABLE="/usr/bin/Singular" && export SINGULAR_EXECUTABLE
# Handle parallel building/testing/...
# See Trac Ticket #12016
# First, figure out the right values for SAGE_NUM_THREADS (default
# number of threads) and SAGE_NUM_THREADS_PARALLEL (default number of
# threads when parallel execution is asked explicitly).
sage_num_threads_array=(`sage-num-threads.py 2>/dev/null || echo 1 2 1`)
SAGE_NUM_THREADS=${sage_num_threads_array[0]}
SAGE_NUM_THREADS_PARALLEL=${sage_num_threads_array[1]}
export SAGE_NUM_THREADS
export SAGE_NUM_THREADS_PARALLEL
# Display the Sage startup banner, used in src/bin/sage
sage_banner() {
if [ "$SAGE_BANNER" != "no" ]; then
cat "$SAGE_SCRIPTS_DIR/sage-banner" 2>/dev/null
fi
}
|