Update to sagemath 8.0

This commit is contained in:
pcpa 2017-11-10 11:26:56 -05:00
parent b78abd5373
commit abc6d11c12
27 changed files with 290 additions and 655 deletions

View file

@ -1,6 +1,6 @@
diff -up src/bin/sage.orig src/bin/sage
--- src/bin/sage.orig 2017-04-11 09:46:27.981240007 -0400
+++ src/bin/sage 2017-04-11 09:53:04.143255178 -0400
--- src/bin/sage.orig 2017-11-08 06:04:08.687887432 -0500
+++ src/bin/sage 2017-11-08 06:10:52.452902893 -0500
@@ -1,5 +1,16 @@
#!/usr/bin/env bash
@ -18,7 +18,7 @@ diff -up src/bin/sage.orig src/bin/sage
help_banner() {
sage_banner | grep -v 'Type'
echo
@@ -13,20 +24,16 @@ usage() {
@@ -13,13 +24,10 @@ 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"
@ -32,14 +32,15 @@ diff -up src/bin/sage.orig src/bin/sage
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"
@@ -27,7 +35,6 @@ usage() {
echo " 'default', 'sagenb', 'jupyter', and 'export')"
echo " Current default is 'export' from sagenb to jupyter"
echo " -n, --notebook -- shortcut for --notebook=default"
- echo " -optional -- list all optional packages that can be installed"
echo " -python [...] -- run the Python interpreter"
echo " -python [...] -- run the Python 2 interpreter"
echo " -python3 [...] -- run the Python 3 interpreter"
echo " -R [...] -- run Sage's R with given arguments"
echo " -singular [...] -- run Sage's singular with given arguments"
@@ -42,10 +49,6 @@ usage() {
@@ -44,10 +51,6 @@ usage() {
echo " --optional - controls which optional tests are run"
echo " --sagenb - test all sagenb files"
echo " --help - show all testing options"
@ -50,7 +51,7 @@ diff -up src/bin/sage.orig src/bin/sage
echo " -v, -version -- display Sage version information"
exit 0
}
@@ -64,11 +67,8 @@ usage_advanced() {
@@ -66,11 +69,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"
@ -62,7 +63,7 @@ diff -up src/bin/sage.orig src/bin/sage
echo
#### 1.......................26..................................................78
@@ -79,8 +79,6 @@ usage_advanced() {
@@ -82,8 +82,6 @@ usage_advanced() {
echo " See the output of sage --notebook --help"
echo " for more details and examples of how to pass"
echo " optional arguments"
@ -71,25 +72,26 @@ diff -up src/bin/sage.orig src/bin/sage
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"
@@ -99,17 +97,13 @@ usage_advanced() {
@@ -102,18 +100,11 @@ 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 " (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 " (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 " -polymake [...] -- run Sage's Polymake with given arguments"
- command -v polymake &>/dev/null || \
echo " (not installed currently, run sage -i polymake)"
- echo " (not installed currently, run sage -i polymake)"
echo " -python [...] -- run the Python interpreter"
echo " -R [...] -- run Sage's R with given arguments"
@@ -122,55 +116,7 @@ usage_advanced() {
echo " -scons [...] -- run Sage's scons"
@@ -125,55 +116,7 @@ usage_advanced() {
echo
#### 1.......................26..................................................78
#### |.....................--.|...................................................|
@ -146,7 +148,7 @@ diff -up src/bin/sage.orig src/bin/sage
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"
@@ -200,7 +146,6 @@ usage_advanced() {
@@ -203,7 +146,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"
@ -154,7 +156,7 @@ diff -up src/bin/sage.orig src/bin/sage
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"
@@ -222,16 +167,6 @@ usage_advanced() {
@@ -225,16 +167,6 @@ usage_advanced() {
echo
#### 1.......................26..................................................78
#### |.....................--.|...................................................|
@ -171,7 +173,7 @@ diff -up src/bin/sage.orig src/bin/sage
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"
@@ -245,9 +180,6 @@ usage_advanced() {
@@ -248,9 +180,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"
@ -181,7 +183,7 @@ diff -up src/bin/sage.orig src/bin/sage
echo " -valgrind -- this is an alias for -memcheck"
echo
echo "You can also use -- before a long option, e.g., 'sage --optional'."
@@ -256,121 +188,6 @@ usage_advanced() {
@@ -259,121 +188,6 @@ usage_advanced() {
}
@ -303,12 +305,15 @@ diff -up src/bin/sage.orig src/bin/sage
if [ $# -gt 0 ]; then
if [ "$1" = '-h' -o "$1" = '-?' -o "$1" = '-help' -o "$1" = '--help' ]; then
usage
@@ -382,23 +199,9 @@ fi
@@ -383,25 +197,12 @@ if [ $# -gt 0 ]; then
fi
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
- if [ ! -x "$SAGE_LOCAL/bin/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'
@ -319,7 +324,7 @@ diff -up src/bin/sage.orig src/bin/sage
- exit 1
- fi
-
# Display the startup banner (unless SAGE_BANNER is explictly "no")
# Display the startup banner (unless SAGE_BANNER is explicitly "no")
sage_banner
- maybe_sage_location
@ -327,7 +332,7 @@ diff -up src/bin/sage.orig src/bin/sage
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
@@ -409,20 +212,6 @@ sage_setup() {
@@ -412,20 +213,6 @@ sage_setup() {
}
@ -348,7 +353,7 @@ diff -up src/bin/sage.orig src/bin/sage
# Start an interactive Sage session, this function never returns.
interactive_sage() {
sage_setup
@@ -527,16 +316,6 @@ if [ "$1" = '-lisp' -o "$1" = '--lisp' ]
@@ -530,16 +317,6 @@ if [ "$1" = '-lisp' -o "$1" = '--lisp' ]
exec ecl "$@"
fi
@ -365,7 +370,7 @@ diff -up src/bin/sage.orig src/bin/sage
if [ "$1" = '-maxima' -o "$1" = '--maxima' ]; then
shift
exec maxima "$@"
@@ -562,11 +341,6 @@ if [ "$1" = '-pip' -o "$1" = '--pip' ];
@@ -565,11 +342,6 @@ if [ "$1" = '-pip' -o "$1" = '--pip' ];
exec pip "$@"
fi
@ -377,7 +382,7 @@ diff -up src/bin/sage.orig src/bin/sage
if [ "$1" = '-python' -o "$1" = '--python' ]; then
shift
exec python "$@"
@@ -582,16 +356,6 @@ if [ "$1" = '-ipython' -o "$1" = '--ipyt
@@ -595,16 +367,6 @@ if [ "$1" = '-ipython' -o "$1" = '--ipyt
exec ipython "$@"
fi
@ -394,7 +399,7 @@ diff -up src/bin/sage.orig src/bin/sage
if [ "$1" = '-sh' -o "$1" = '--sh' ]; then
# AUTHORS:
# - Carl Witty and William Stein: initial version
@@ -711,20 +475,6 @@ EOF
@@ -724,20 +486,6 @@ EOF
fi
#####################################################################
@ -415,7 +420,7 @@ diff -up src/bin/sage.orig src/bin/sage
# File conversion
#####################################################################
@@ -747,11 +497,6 @@ fi
@@ -760,11 +508,6 @@ fi
# Run Sage's versions of the standard Algebra/Geometry etc. software
#####################################################################
@ -427,7 +432,7 @@ diff -up src/bin/sage.orig src/bin/sage
if [[ "$1" =~ ^--notebook=.* || "$1" =~ ^-n=.* || "$1" =~ ^-notebook=.* ]] ; then
sage-cleaner &>/dev/null &
exec sage-notebook "$@"
@@ -762,13 +507,6 @@ if [ "$1" = "-notebook" -o "$1" = '--not
@@ -775,13 +518,6 @@ if [ "$1" = "-notebook" -o "$1" = '--not
exec sage-notebook "$@"
fi
@ -441,7 +446,7 @@ diff -up src/bin/sage.orig src/bin/sage
if [ "$1" = "-inotebook" -o "$1" = '--inotebook' ]; then
shift
sage-cleaner &>/dev/null &
@@ -787,38 +525,19 @@ if [ "$1" = '-grepdoc' -o "$1" = "--grep
@@ -800,34 +536,15 @@ if [ "$1" = '-grepdoc' -o "$1" = "--grep
exit 0
fi
@ -471,10 +476,6 @@ diff -up src/bin/sage.orig src/bin/sage
- 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
fi
SAGE_BANNER=no sage_setup
export PYTHONIOENCODING="utf-8" # Fix encoding for doctests
- if [ "$1" = '-tp' -o "$1" = '-btp' ]; then
@ -482,7 +483,7 @@ diff -up src/bin/sage.orig src/bin/sage
shift
exec sage-runtests -p "$@"
else
@@ -827,16 +546,6 @@ if [ "$1" = '-t' -o "$1" = '-bt' -o "$1"
@@ -836,10 +553,7 @@ if [ "$1" = '-t' -o "$1" = '-bt' -o "$1"
fi
fi
@ -490,16 +491,11 @@ diff -up src/bin/sage.orig src/bin/sage
- 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
+if [ "$1" = '-tnew' ]; then
shift
SAGE_BANNER=no sage_setup
@@ -851,119 +560,6 @@ if [ "$1" = '-c' ]; then
export PYTHONIOENCODING="utf-8" # Fix encoding for doctests
@@ -860,119 +574,6 @@ if [ "$1" = '-c' ]; then
exec sage-eval "$@"
fi
@ -619,7 +615,7 @@ diff -up src/bin/sage.orig src/bin/sage
if [ "$1" = '-gdb' -o "$1" = "--gdb" ]; then
shift
sage_setup
@@ -1014,12 +610,6 @@ if [ "$1" = '-callgrind' -o "$1" = "--ca
@@ -1023,12 +624,6 @@ if [ "$1" = '-callgrind' -o "$1" = "--ca
exec sage-callgrind "$@"
fi
@ -632,35 +628,23 @@ diff -up src/bin/sage.orig src/bin/sage
if [ "$1" = '-startuptime' -o "$1" = '--startuptime' ]; then
exec sage-startuptime.py "$@"
fi
@@ -1030,11 +620,6 @@ if [ "$1" = '-gthread' -o "$1" = '-qthre
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
exec sage-run "$@"
fi
diff -up src/bin/sage-runtests.orig src/bin/sage-runtests
--- src/bin/sage-runtests.orig 2017-04-11 09:53:17.222255678 -0400
+++ src/bin/sage-runtests 2017-04-11 09:53:31.631256230 -0400
@@ -56,10 +56,6 @@ if __name__ == "__main__":
--- src/bin/sage-runtests.orig 2017-11-08 06:11:02.679903285 -0500
+++ src/bin/sage-runtests 2017-11-08 06:11:18.876903905 -0500
@@ -64,10 +64,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"))
os.path.join(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"))
- os.path.join(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 2017-04-11 09:53:45.006256742 -0400
+++ src/bin/sage-valgrind 2017-04-11 09:54:05.879257542 -0400
--- src/bin/sage-valgrind.orig 2017-11-08 06:11:27.655904241 -0500
+++ src/bin/sage-valgrind 2017-11-08 06:11:40.964904751 -0500
@@ -1,16 +1,6 @@
#!/usr/bin/env bash