mirror of
https://src.fedoraproject.org/rpms/sagemath.git
synced 2025-04-17 01:39:02 -04:00
591 lines
23 KiB
Diff
591 lines
23 KiB
Diff
diff -up src/bin/sage.orig src/bin/sage
|
|
--- src/bin/sage.orig 2015-11-07 11:53:13.984795336 -0200
|
|
+++ src/bin/sage 2015-11-07 11:53:51.199796761 -0200
|
|
@@ -13,19 +13,15 @@ usage() {
|
|
echo " file.[sage|py|spyx] -- run given .sage, .py or .spyx file"
|
|
echo " -advanced -- list all command line options"
|
|
echo " -c <cmd> -- Evaluates cmd as sage code"
|
|
- echo " -experimental -- list all experimental packages that can be installed"
|
|
echo " -gap [...] -- run Sage's Gap with given arguments"
|
|
echo " -gp [...] -- run Sage's PARI/GP calculator with given arguments"
|
|
echo " -h, -? -- print this help message"
|
|
- echo " -i [packages] -- install the given Sage packages"
|
|
- echo " -pip [...] -- invoke pip, the Python package manager"
|
|
echo " -inotebook [...] -- start the *insecure* Sage notebook (deprecated)"
|
|
echo " -maxima [...] -- run Sage's Maxima with given arguments"
|
|
echo " -mwrank [...] -- run Sage's mwrank with given arguments"
|
|
echo " --notebook=[...] -- start the Sage notebook (valid options are"
|
|
echo " 'default', 'sagenb', and 'ipython')"
|
|
echo " -n, --notebook -- shortcut for --notebook=default"
|
|
- echo " -optional -- list all optional packages that can be installed"
|
|
echo " -python [...] -- run the Python interpreter"
|
|
echo " -R [...] -- run Sage's R with given arguments"
|
|
echo " -singular [...] -- run Sage's singular with given arguments"
|
|
@@ -41,10 +37,6 @@ usage() {
|
|
echo " --optional - controls which optional tests are run"
|
|
echo " --sagenb - test all sagenb files"
|
|
echo " --help - show all testing options"
|
|
- echo " -upgrade [version] -- download, build and install the given version. Here,"
|
|
- echo " 'version' is a git branch or tag name. Useful values"
|
|
- echo " are 'master' (the current development version, this"
|
|
- echo " is the default) or a version number like '5.13'."
|
|
echo " -v, -version -- display Sage version information"
|
|
exit 0
|
|
}
|
|
@@ -63,11 +55,8 @@ usage_advanced() {
|
|
echo " -preparse <file.sage> -- preparse file.sage and produce corresponding file.sage.py"
|
|
echo " -q -- quiet; start with no banner"
|
|
echo " -root -- print the Sage root directory"
|
|
- echo " -gthread, -qthread, -q4thread, -wthread, -pylab"
|
|
- echo " -- pass the option through to ipython"
|
|
echo " -v, -version -- display Sage version information"
|
|
echo " -dumpversion -- print Sage version"
|
|
- echo " -git-branch -- print the current git branch"
|
|
|
|
echo
|
|
#### 1.......................26..................................................78
|
|
@@ -77,8 +66,6 @@ usage_advanced() {
|
|
echo " 'default', 'sagenb', and 'ipython'). See the output"
|
|
echo " of sage --notebook --help for more details and"
|
|
echo " examples of how to pass optional arguments"
|
|
- echo " -bn, -build-and-notebook [...] -- build the Sage library then start"
|
|
- echo " the Sage notebook"
|
|
echo " -inotebook [...] -- start the *insecure* Sage notebook (deprecated)"
|
|
echo " -n, -notebook [...] -- start the default Sage notebook (options are the"
|
|
echo " same as for the notebook command in Sage). See the"
|
|
@@ -96,13 +83,9 @@ usage_advanced() {
|
|
echo " -gp [...] -- run Sage's PARI/GP calculator with given arguments"
|
|
echo " -ipython [...] -- run Sage's IPython using the default environment (not"
|
|
echo " Sage), passing additional options to IPython"
|
|
- echo " -kash [...] -- run Sage's Kash with given arguments"
|
|
- command -v kash &>/dev/null || \
|
|
echo " (not installed currently, run sage -i kash)"
|
|
echo " -lisp [...] -- run Lisp interpreter included with Sage"
|
|
echo " -M2 [...] -- run Sage's Macaulay2 with given arguments"
|
|
- command -v M2 &>/dev/null || \
|
|
- echo " (not installed currently, run sage -i macaulay2)"
|
|
echo " -maxima [...] -- run Sage's Maxima with given arguments"
|
|
echo " -mwrank [...] -- run Sage's mwrank with given arguments"
|
|
echo " -python [...] -- run the Python interpreter"
|
|
@@ -116,45 +99,7 @@ usage_advanced() {
|
|
echo
|
|
#### 1.......................26..................................................78
|
|
#### |.....................--.|...................................................|
|
|
- echo "Installing packages and upgrading:"
|
|
- echo " -experimental -- list all experimental packages that can be installed"
|
|
- echo " -f [opts] [packages]-- shortcut for -i -f: force build of the given Sage"
|
|
- echo " packages"
|
|
- echo " -i [opts] [packages]-- install the given Sage packages (unless they are"
|
|
- echo " already installed); if no packages are given, print"
|
|
- echo " a list of all installed packages. Options:"
|
|
- echo " -c -- run the packages' test suites"
|
|
- echo " -f -- force build: install the packages even"
|
|
- echo " if they are already installed"
|
|
- echo " -s -- do not delete the spkg/build directories"
|
|
- echo " after a successful build"
|
|
- echo " -info [packages] -- print the SPKG.txt of the given packages"
|
|
- echo " -optional -- list all optional packages that can be installed"
|
|
- echo " -standard -- list all standard packages that can be installed"
|
|
- echo " -installed -- list all installed packages"
|
|
- #echo " -update -- download latest non-optional Sage packages (do not build them)"
|
|
- #echo " -update-build -- build and install all downloaded non-optional Sage packages"
|
|
- echo " -upgrade [version] -- download, build and install the given version. Here,"
|
|
- echo " 'version' is a git branch or tag name. Useful values"
|
|
- echo " are 'master' (the current development version, this"
|
|
- echo " is the default) or a version number like '5.13'."
|
|
- echo " -pip [...] -- invoke pip, the Python package manager"
|
|
-
|
|
- echo
|
|
- #### 1.......................26..................................................78
|
|
- #### |.....................--.|...................................................|
|
|
- echo "Building and testing the Sage library:"
|
|
- echo " -b -- build Sage library."
|
|
- echo " -ba -- same as -b and rebuild all Cython code"
|
|
- echo " -ba-force -- same as -ba, but don't query before rebuilding"
|
|
- echo " -br -- build and run Sage"
|
|
- echo " -bt [...] -- build and test, options like -t below"
|
|
- echo " -btp <N> [...] -- build and test parallel, options like -tp below"
|
|
- echo " -btnew [...] -- build and test modified files, options like -tnew"
|
|
- echo " -fixdoctests <file.py> [output_file] [--long]"
|
|
- echo " -- replace failing doctests with the actual output. With"
|
|
- echo " optional output_file: redirect there. With the --long"
|
|
- echo " option: include #long time tests."
|
|
+ echo "Testing the Sage library:"
|
|
echo " -startuptime [module] -- display how long each component of Sage takes to"
|
|
echo " start up; optionally specify a module to get more"
|
|
echo " details about that particular module"
|
|
@@ -184,7 +129,6 @@ usage_advanced() {
|
|
echo " -coverage <files> -- give info about doctest coverage of files"
|
|
echo " -coverageall -- give summary info about doctest coverage of all"
|
|
echo " files in the Sage library"
|
|
- echo " -docbuild [lang/]<document> <html|pdf|...> -- Build the Sage documentation"
|
|
echo " -search_src <string> -- search through all the Sage library code for string"
|
|
echo " -search_doc <string> -- search through the Sage documentation for string"
|
|
echo " -grep <string> -- same as -search_src"
|
|
@@ -204,15 +148,6 @@ usage_advanced() {
|
|
echo
|
|
#### 1.......................26..................................................78
|
|
#### |.....................--.|...................................................|
|
|
- echo "Making Sage packages or distributions:"
|
|
- echo " -bdist <tmpdir> -- build a binary distribution of Sage"
|
|
- echo " -pkg <dir> -- create Sage package dir.spkg from a given directory"
|
|
- echo " -pkg_nc <dir> -- as -pkg, but do not compress the package"
|
|
- echo " -sdist -- build a source distribution of Sage"
|
|
-
|
|
- echo
|
|
- #### 1.......................26..................................................78
|
|
- #### |.....................--.|...................................................|
|
|
echo "Valgrind memory debugging:"
|
|
echo " -cachegrind -- run Sage using Valgrind's cachegrind tool. The log"
|
|
echo " files are named sage-cachegrind.PID can be found in"
|
|
@@ -226,9 +161,6 @@ usage_advanced() {
|
|
echo " -memcheck -- run Sage using Valgrind's memcheck tool. The log"
|
|
echo " files are named sage-memcheck.PID can be found in"
|
|
echo " $DOT_SAGE"
|
|
- echo " -omega -- run Sage using Valgrind's omega tool. The log"
|
|
- echo " files are named sage-omega.PID can be found in"
|
|
- echo " $DOT_SAGE"
|
|
echo " -valgrind -- this is an alias for -memcheck"
|
|
echo
|
|
echo "You can also use -- before a long option, e.g., 'sage --optional'."
|
|
@@ -236,9 +168,6 @@ usage_advanced() {
|
|
exit 0
|
|
}
|
|
|
|
-# Check for '--nodotsage' before sourcing sage-env; otherwise sage-env
|
|
-# will already have set some environment variables with the old
|
|
-# setting for DOT_SAGE.
|
|
if [ "$1" = '--nodotsage' ]; then
|
|
export DOT_SAGE=`mktemp -d ${TMPDIR:-/tmp}/dotsageXXXXXX`
|
|
shift
|
|
@@ -248,34 +177,6 @@ if [ "$1" = '--nodotsage' ]; then
|
|
exit $status
|
|
fi
|
|
|
|
-# Check for '--patchbot' before sourcing sage-env: patchbot needs
|
|
-# an unclobbered environment before testing unsafe tickets.
|
|
-if [ "$1" = '-patchbot' -o "$1" = "--patchbot" ]; then
|
|
- shift
|
|
- cd "$SAGE_ROOT"
|
|
- exec local/bin/patchbot/patchbot.py "$@"
|
|
-fi
|
|
-
|
|
-# Check for '--upgrade' before sourcing sage-env: the top-level "make"
|
|
-# should be run outside of the Sage shell, see #15517.
|
|
-if [ "$1" = '-upgrade' -o "$1" = "--upgrade" ]; then
|
|
- shift
|
|
- cd "$SAGE_ROOT"
|
|
- exec local/bin/sage-upgrade "$@"
|
|
-fi
|
|
-
|
|
-
|
|
-# Source sage-env ($0 is the name of this "sage" script, so we can just
|
|
-# append -env to that). We redirect stdout to stderr, which is safer
|
|
-# for scripts.
|
|
-. "$0-env" >&2
|
|
-if [ $? -ne 0 ]; then
|
|
- echo >&2 "Error setting environment variables by sourcing '$0-env';"
|
|
- echo >&2 "possibly contact sage-devel (see http://groups.google.com/group/sage-devel)."
|
|
- exit 1
|
|
-fi
|
|
-
|
|
-
|
|
if [ $# -gt 0 ]; then
|
|
if [ "$1" = '-h' -o "$1" = '-?' -o "$1" = '-help' -o "$1" = '--help' ]; then
|
|
usage
|
|
@@ -287,25 +188,11 @@ fi
|
|
|
|
# Prepare for running Sage, either interactively or non-interactively.
|
|
sage_setup() {
|
|
- # Check that we're not in a source tarball which hasn't been built yet (#13561).
|
|
- if [ ! -d "$SAGE_LOCAL/lib/python/site-packages/sage" ]; then
|
|
- echo >&2 '************************************************************************'
|
|
- echo >&2 'It seems that you are attempting to run Sage from an unpacked source'
|
|
- echo >&2 'tarball, but you have not compiled it yet (or maybe the build has not'
|
|
- echo >&2 'finished). You should run `make` in the Sage root directory first.'
|
|
- echo >&2 'If you did not intend to build Sage from source, you should download'
|
|
- echo >&2 'a binary tarball instead. Read README.txt for more information.'
|
|
- echo >&2 '************************************************************************'
|
|
- exit 1
|
|
- fi
|
|
-
|
|
# Display the startup banner
|
|
if [ "$SAGE_BANNER" != "no" ]; then
|
|
cat "$SAGE_LOCAL/bin/sage-banner"
|
|
fi
|
|
|
|
- maybe_sage_location
|
|
-
|
|
if [ ! -d "$IPYTHONDIR" ]; then
|
|
# make sure that $DOT_SAGE exists so that ipython will happily
|
|
# create its config directories there. If DOT_SAGE doesn't
|
|
@@ -316,20 +203,6 @@ sage_setup() {
|
|
}
|
|
|
|
|
|
-# Check to see if the whole Sage install tree has moved. If so,
|
|
-# change various hardcoded paths. Skip this if we don't have write
|
|
-# access to $SAGE_LOCAL (e.g. when running as a different user) or
|
|
-# if Python and sage-location haven't been installed yet.
|
|
-maybe_sage_location()
|
|
-{
|
|
- if [ -w "$SAGE_LOCAL" ]; then
|
|
- if [ -x "$SAGE_LOCAL/bin/python" ] && [ -x "$SAGE_LOCAL/bin/sage-location" ]; then
|
|
- sage-location || exit $?
|
|
- fi
|
|
- fi
|
|
-}
|
|
-
|
|
-
|
|
# Start an interactive Sage session, this function never returns.
|
|
interactive_sage() {
|
|
sage_setup
|
|
@@ -396,7 +269,7 @@ fi
|
|
|
|
if [ "$1" = '-singular' -o "$1" = '--singular' ]; then
|
|
shift
|
|
- exec singular "$@"
|
|
+ exec Singular "$@"
|
|
fi
|
|
|
|
if [ "$1" = '-sqlite3' -o "$1" = '--sqlite3' ]; then
|
|
@@ -424,16 +297,6 @@ if [ "$1" = '-lisp' -o "$1" = '--lisp' ]
|
|
exec ecl "$@"
|
|
fi
|
|
|
|
-if [ "$1" = '-kash' -o "$1" = '--kash' ]; then
|
|
- shift
|
|
- exec kash "$@"
|
|
-fi
|
|
-
|
|
-if [ "$1" = '-fixdoctests' -o "$1" = '--fixdoctests' ]; then
|
|
- shift
|
|
- exec sage-fixdoctests "$@"
|
|
-fi
|
|
-
|
|
if [ "$1" = '-maxima' -o "$1" = '--maxima' ]; then
|
|
shift
|
|
exec maxima "$@"
|
|
@@ -474,16 +337,6 @@ if [ "$1" = '-ipython' -o "$1" = '--ipyt
|
|
exec ipython "$@"
|
|
fi
|
|
|
|
-if [ "$1" = '-git' -o "$1" = '--git' ]; then
|
|
- shift
|
|
- exec git "$@"
|
|
-fi
|
|
-
|
|
-if [ "$1" = '-git-branch' -o "$1" = '--git-branch' ]; then
|
|
- shift
|
|
- exec git --git-dir="$SAGE_ROOT"/.git rev-parse --abbrev-ref HEAD
|
|
-fi
|
|
-
|
|
if [ "$1" = '-sh' -o "$1" = '--sh' ]; then
|
|
# AUTHORS:
|
|
# - Carl Witty and William Stein: initial version
|
|
@@ -603,20 +456,6 @@ EOF
|
|
fi
|
|
|
|
#####################################################################
|
|
-# Test coverage of a module?
|
|
-#####################################################################
|
|
-
|
|
-if [ "$1" = "-coverage" -o "$1" = "--coverage" ]; then
|
|
- shift
|
|
- exec sage-coverage "$@"
|
|
-fi
|
|
-
|
|
-if [ "$1" = "-coverageall" -o "$1" = "--coverageall" ]; then
|
|
- shift
|
|
- exec sage-coverageall "$@"
|
|
-fi
|
|
-
|
|
-#####################################################################
|
|
# File conversion
|
|
#####################################################################
|
|
|
|
@@ -634,11 +473,6 @@ fi
|
|
# Run Sage's versions of the standard Algebra/Geometry etc. software
|
|
#####################################################################
|
|
|
|
-build_sage() {
|
|
- maybe_sage_location
|
|
- ( cd "$SAGE_SRC" && $MAKE ) || exit $?
|
|
-}
|
|
-
|
|
if [[ "$1" =~ ^--notebook=.* || "$1" =~ ^-n=.* || "$1" =~ ^-notebook=.* ]] ; then
|
|
sage-cleaner &>/dev/null &
|
|
exec sage-notebook "$@"
|
|
@@ -649,13 +483,6 @@ if [ "$1" = "-notebook" -o "$1" = '--not
|
|
exec sage-notebook "$@"
|
|
fi
|
|
|
|
-if [ "$1" = "-bn" -o "$1" = "--build-and-notebook" ]; then
|
|
- shift
|
|
- build_sage
|
|
- sage-cleaner &>/dev/null &
|
|
- exec sage-notebook --notebook=default "$@"
|
|
-fi
|
|
-
|
|
if [ "$1" = "-inotebook" -o "$1" = '--inotebook' ]; then
|
|
shift
|
|
sage-cleaner &>/dev/null &
|
|
@@ -674,31 +501,12 @@ if [ "$1" = '-grepdoc' -o "$1" = "--grep
|
|
exit 0
|
|
fi
|
|
|
|
-if [ "$1" = '-b' ]; then
|
|
- time build_sage
|
|
- exit $?
|
|
-fi
|
|
-
|
|
-if [ "$1" = '-br' -o "$1" = "--br" ]; then
|
|
- build_sage
|
|
- interactive_sage
|
|
-fi
|
|
-
|
|
if [ "$1" = '-r' ]; then
|
|
shift
|
|
interactive_sage
|
|
fi
|
|
|
|
-if [ "$1" = '-ba' -o "$1" = '-ba-force' -o "$1" = '--ba-force' ]; then
|
|
- ( cd "$SAGE_SRC" && make clean )
|
|
- build_sage
|
|
- exit $?
|
|
-fi
|
|
-
|
|
-if [ "$1" = '-t' -o "$1" = '-bt' -o "$1" = '-tp' -o "$1" = '-btp' ]; then
|
|
- if [ "$1" = '-bt' -o "$1" = '-btp' ]; then
|
|
- build_sage
|
|
- fi
|
|
+if [ "$1" = '-t' -o "$1" = '-tp' ]; then
|
|
if [ ! -f "$DOT_SAGE"/init.sage ]; then
|
|
echo >&2 "init.sage does not exist ... creating"
|
|
touch "$DOT_SAGE"/init.sage
|
|
@@ -715,17 +523,6 @@ if [ "$1" = '-t' -o "$1" = '-bt' -o "$1"
|
|
fi
|
|
fi
|
|
|
|
-if [ "$1" = '-tnew' -o "$1" = '-btnew' ]; then
|
|
- if [ "$1" = '-btnew' ]; then
|
|
- build_sage
|
|
- fi
|
|
- shift
|
|
- SAGE_BANNER="no"
|
|
- sage_setup
|
|
- export PYTHONIOENCODING="utf-8" # Fix encoding for doctests
|
|
- exec sage-runtests --new "$@"
|
|
-fi
|
|
-
|
|
if [ "$1" = '-testall' -o "$1" = "--testall" ]; then
|
|
shift
|
|
SAGE_BANNER="no"
|
|
@@ -742,140 +539,6 @@ if [ "$1" = '-c' ]; then
|
|
exec sage-eval "$@"
|
|
fi
|
|
|
|
-install() {
|
|
- maybe_sage_location
|
|
-
|
|
- mkdir -p "$SAGE_LOGS"
|
|
- for PKG in "$@"
|
|
- do
|
|
- # Check for options
|
|
- case "$PKG" in
|
|
- -f) OPTF="-f"
|
|
- continue;;
|
|
- -m) OPTS="-s"
|
|
- echo >&2 "Warning: the -m option is deprecated since Sage 5.0. Use -s instead."
|
|
- continue;;
|
|
- -s) OPTS="-s"
|
|
- continue;;
|
|
- -c) OPTC="-c"
|
|
- continue;;
|
|
- --check) OPTC="-c"
|
|
- continue;;
|
|
- -info) OPTINFO="--info"
|
|
- continue;;
|
|
- --info) OPTINFO="--info"
|
|
- continue;;
|
|
- -*) echo >&2 "Error: unknown option '$PKG'"
|
|
- exit 2;;
|
|
- esac
|
|
-
|
|
- PKG_NAME=`echo "$PKG" | sed -e "s/\.spkg$//"`
|
|
- PKG_NAME=`basename "$PKG_NAME"`
|
|
-
|
|
- "$SAGE_ROOT"/build/make/pipestatus \
|
|
- "sage-spkg $OPTINFO $OPTF $OPTS $OPTC '$PKG' 2>&1" \
|
|
- "(trap '' SIGINT; tee -a '$SAGE_ROOT/logs/install.log' '$SAGE_LOGS/$PKG_NAME.log')"
|
|
- # Do not try to install further packages if one failed
|
|
- if [ $? -ne 0 ]; then
|
|
- exit 1
|
|
- fi
|
|
- done
|
|
- # Display a message if we actually installed something (using this
|
|
- # file, generated by sage-spkg, is a bit of a hack though)
|
|
- if [ -f "$SAGE_LOCAL/lib/sage-force-relocate.txt" ]; then
|
|
- echo
|
|
- echo "Warning: it might be needed to update the Sage library before"
|
|
- echo "installed packages work: you should run 'make' from \$SAGE_ROOT"
|
|
- echo "before running Sage."
|
|
- fi
|
|
- exit 0
|
|
-}
|
|
-
|
|
-if [ "$1" = '-optional' -o "$1" = "--optional" ]; then
|
|
- shift
|
|
- exec sage-list-packages optional $@
|
|
-fi
|
|
-
|
|
-if [ "$1" = '-experimental' -o "$1" = "--experimental" ]; then
|
|
- shift
|
|
- exec sage-list-packages experimental $@
|
|
-fi
|
|
-
|
|
-if [ "$1" = '-standard' -o "$1" = "--standard" ]; then
|
|
- shift
|
|
- exec sage-list-packages standard $@
|
|
-fi
|
|
-
|
|
-if [ "$1" = '-installed' -o "$1" = "--installed" ]; then
|
|
- shift
|
|
- exec sage-list-packages installed $@
|
|
-fi
|
|
-
|
|
-if [ "$1" = '-i' ]; then
|
|
- shift
|
|
- # If there are no further arguments, simply list all installed
|
|
- # packages.
|
|
- if [ $# -eq 0 ]; then
|
|
- exec sage-spkg
|
|
- fi
|
|
- install "$@"
|
|
-fi
|
|
-
|
|
-if [ "$1" = '-f' ]; then
|
|
- shift
|
|
- # If there are no further arguments, simply list all installed
|
|
- # packages.
|
|
- if [ $# -eq 0 ]; then
|
|
- exec sage-spkg
|
|
- fi
|
|
- install -f "$@"
|
|
-fi
|
|
-
|
|
-if [ "$1" = '-info' -o "$1" = '--info' ]; then
|
|
- shift
|
|
- for PKG in "$@"
|
|
- do
|
|
- sage-spkg --info "$PKG" || exit $?
|
|
- done
|
|
- exit 0
|
|
-fi
|
|
-
|
|
-if [ "$1" = '-pkg' -o "$1" = '-spkg' -o "$1" = "--pkg" -o "$1" = "--spkg" ]; then
|
|
- shift
|
|
- exec sage-pkg "$@"
|
|
-fi
|
|
-
|
|
-if [ "$1" = '-pkg_nc' -o "$1" = "--pkg_nc" ]; then
|
|
- shift
|
|
- exec sage-pkg -n "$@"
|
|
-fi
|
|
-
|
|
-if [ "$1" = '-sdist' -o "$1" = "--sdist" ]; then
|
|
- maybe_sage_location
|
|
- shift
|
|
- exec sage-sdist "$@"
|
|
-fi
|
|
-
|
|
-if [ "$1" = '-rsyncdist' -o "$1" = "--rsyncdist" ]; then
|
|
- if [ $# -ne 2 ]; then
|
|
- echo >&2 "** MISSING VERSION NUMBER! **"
|
|
- exit 2
|
|
- fi
|
|
- maybe_sage_location
|
|
- exec sage-rsyncdist $2
|
|
-fi
|
|
-
|
|
-if [ "$1" = '-bdist' -o "$1" = "--bdist" ]; then
|
|
- maybe_sage_location
|
|
- shift
|
|
- exec sage-bdist "$@"
|
|
-fi
|
|
-
|
|
-if [ "$1" = "-docbuild" -o "$1" = "--docbuild" ]; then
|
|
- shift
|
|
- exec python "$SAGE_DOC/common/builder.py" "$@"
|
|
-fi
|
|
-
|
|
if [ "$1" = '-gdb' -o "$1" = "--gdb" ]; then
|
|
shift
|
|
sage_setup
|
|
@@ -924,31 +587,11 @@ if [ "$1" = '-callgrind' -o "$1" = "--ca
|
|
exec sage-callgrind "$@"
|
|
fi
|
|
|
|
-if [ "$1" = '-omega' -o "$1" = "--omega" ]; then
|
|
- shift
|
|
- sage_setup
|
|
- exec sage-omega "$@"
|
|
-fi
|
|
-
|
|
if [ "$1" = '-startuptime' -o "$1" = '--startuptime' ]; then
|
|
exec sage-startuptime.py "$@"
|
|
fi
|
|
|
|
-if [ "$1" = '-gthread' -o "$1" = '-qthread' -o "$1" = '-q4thread' -o "$1" = '-wthread' -o "$1" = '-pylab' ]; then
|
|
- # Intentionally no "shift" here
|
|
- interactive_sage "$@"
|
|
-fi
|
|
-
|
|
-if [ "$1" = '-dev' -o "$1" = "--dev" ]; then
|
|
- shift
|
|
- exec sage-dev "$@"
|
|
-fi
|
|
-
|
|
if [ $# -ge 1 ]; then
|
|
- T=`echo "$1" | sed -e "s/.*\.//"`
|
|
- if [ "$T" = "spkg" ]; then
|
|
- install "$@"
|
|
- fi
|
|
SAGE_BANNER="no"
|
|
sage_setup
|
|
unset TERM # See Trac #12263
|
|
diff -up src/bin/sage-runtests.orig src/bin/sage-runtests
|
|
--- src/bin/sage-runtests.orig 2015-11-07 11:53:13.991795336 -0200
|
|
+++ src/bin/sage-runtests 2015-11-07 11:53:18.458795507 -0200
|
|
@@ -55,10 +55,6 @@ if __name__ == "__main__":
|
|
help="run doctests using Valgrind's cachegrind tool. The log "
|
|
"files are named sage-cachegrind.PID and can be found in " +
|
|
os.path.join(os.environ["DOT_SAGE"], "valgrind"))
|
|
- parser.add_option("--omega", action="store_true", default=False,
|
|
- help="run doctests using Valgrind's omega tool. The log "
|
|
- "files are named sage-omega.PID and can be found in " +
|
|
- os.path.join(os.environ["DOT_SAGE"], "valgrind"))
|
|
|
|
parser.add_option("-f", "--failed", action="store_true", default=False,
|
|
help="doctest only those files that failed in the previous run")
|
|
diff -up src/bin/sage-valgrind.orig src/bin/sage-valgrind
|
|
--- src/bin/sage-valgrind.orig 2015-11-07 11:53:13.997795336 -0200
|
|
+++ src/bin/sage-valgrind 2015-11-07 11:53:18.458795507 -0200
|
|
@@ -1,16 +1,6 @@
|
|
#!/usr/bin/env bash
|
|
|
|
-SUPP=""
|
|
-if [ -f "$SAGE_EXTCODE/valgrind/python.supp" ]; then
|
|
- SUPP+=" --suppressions=$SAGE_EXTCODE/valgrind/python.supp"
|
|
-else
|
|
- echo "Python suppressions not found (not installed?), skipping"
|
|
-fi
|
|
-SUPP+=" --suppressions=$SAGE_EXTCODE/valgrind/pyalloc.supp"
|
|
-SUPP+=" --suppressions=$SAGE_EXTCODE/valgrind/sage.supp"
|
|
-SUPP+=" --suppressions=$SAGE_EXTCODE/valgrind/sage-additional.supp"
|
|
-
|
|
-MEMCHECK_FLAGS="--leak-resolution=high --leak-check=full --num-callers=25 $SUPP"
|
|
+MEMCHECK_FLAGS="--leak-resolution=high --leak-check=full --num-callers=25"
|
|
|
|
if [ "$SAGE_MEMCHECK_FLAGS" ]; then
|
|
echo "Overwriting memcheck flags with: $SAGE_MEMCHECK_FLAGS"
|