Skip to content

Commit c7243a6

Browse files
committed
Merge tag '7.4.beta1' into t/21295/sequences/recognizable
SageMath version 7.4.beta1 * tag '7.4.beta1': (1889 commits) Updated SageMath version to 7.4.beta1 Dots removed. Minor changes. More cleanup Add sphinx plots and cleanup Fix doctests and minor cleanup Corrections, changes etc. Trac #21181: Yet a few more formatting fixes in docstrings of sage/combinat/words/finite_word.py Trac #21181 (previously #21178): Change to imperative form in docstrings of sage/combinat/words/finite_word.py, part II Trac #21181 (previously #21178): Change to imperative form in docstrings of sage/combinat/words/finite_word.py Trac #21178: A few more markup/formatting fixes in docstrings of sage/combinat/words/finite_word.py Trac #21178: Fix typos and a lot of markup/formatting in docstrings of sage/combinat/words/finite_word.py py3: no longer use file(name, kind) 21137: minor doc change sqome more typos trac 21241 details Fix formatting trac 21241 typo in faq (preparser) Some small reviewer changes. trac 21208 adding __ne__ in examples ...
2 parents 41874ba + 7b1b3ec commit c7243a6

File tree

2,355 files changed

+92878
-44712
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,355 files changed

+92878
-44712
lines changed

Makefile

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -130,22 +130,12 @@ configure: configure.ac src/bin/sage-version.sh m4/*.m4
130130
./bootstrap -d
131131

132132
install:
133-
echo "Experimental use only!"
134-
if [ "$(DESTDIR)" = "" ]; then \
135-
echo >&2 "Set the environment variable DESTDIR to the install path."; \
136-
exit 1; \
137-
fi
138-
# Make sure we remove only an existing directory. If $(DESTDIR)/sage is
139-
# a file instead of a directory then the mkdir statement later will fail
140-
if [ -d "$(DESTDIR)"/sage ]; then \
141-
rm -rf "$(DESTDIR)"/sage; \
142-
fi
143-
mkdir -p "$(DESTDIR)"/sage
144-
mkdir -p "$(DESTDIR)"/bin
145-
cp -Rp * "$(DESTDIR)"/sage
146-
rm -f "$(DESTDIR)"/bin/sage
147-
ln -s ../sage/sage "$(DESTDIR)"/bin/sage
148-
"$(DESTDIR)"/bin/sage -c # Run sage-location
133+
@echo "******************************************************************"
134+
@echo "The '$@' target is no longer supported:"
135+
@echo "either build SageMath in-place or use the binary packaging scripts"
136+
@echo "from https://github.com/sagemath/binary-pkg"
137+
@echo "******************************************************************"
138+
@exit 1
149139

150140

151141
.PHONY: default build install micro_release \

README.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
> "Creating a Viable Open Source Alternative to
44
> Magma, Maple, Mathematica, and MATLAB"
55
6-
> Copyright (C) 2005-2014 The Sage Development Team
6+
> Copyright (C) 2005-2016 The Sage Development Team
77
88
http://www.sagemath.org
99

@@ -67,7 +67,7 @@ source. More detailed instructions, including how to build faster on
6767
multicore machines, are contained later in this README and in the
6868
Installation Guide:
6969

70-
http://www.sagemath.org/doc/installation
70+
http://doc.sagemath.org/html/en/installation
7171

7272
__1. Make sure you have the dependencies and 5 GB of free disk space.__
7373

@@ -110,14 +110,19 @@ __3. cd into the Sage directory and type make:__
110110
should work fine on all fully supported platforms. If it does not, we
111111
want to know!
112112

113+
If you'd like to contribute to Sage, be sure to read the
114+
Developer's Guide:
115+
116+
http://doc.sagemath.org/html/en/developer/index.html
117+
113118

114119
Environment Variables
115120
---------------------
116121

117122
There are a lot of environment variables which control the install
118123
process of Sage, see:
119124

120-
http://sagemath.org/doc/installation/source.html#environment-variables
125+
http://doc.sagemath.org/html/en/installation/source.html#environment-variables
121126

122127

123128
Implementation
@@ -325,7 +330,7 @@ SAGE_ROOT Root directory (sage-x.y.z in Sage tarball)
325330
```
326331
For more details, see:
327332

328-
http://sagemath.org/doc/developer/coding_basics.html#files-and-directory-structure
333+
http://doc.sagemath.org/html/en/developer/coding_basics.html#files-and-directory-structure
329334

330335

331336
Relocation
@@ -343,7 +348,7 @@ Sage as root at least once prior to using the system-wide Sage as a
343348
normal user. See the Installation Guide for further information on
344349
performing a system-wide installation:
345350

346-
http://www.sagemath.org/doc/installation/source.html#installation-in-a-multiuser-environment
351+
http://doc.sagemath.org/html/en/installation/source.html#installation-in-a-multiuser-environment
347352

348353
If you find anything that doesn't work correctly after you moved the
349354
directory, please email the sage-support mailing list.

VERSION.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
SageMath version 7.2, Release Date: 2016-05-15
1+
SageMath version 7.4.beta1, Release Date: 2016-08-17

build/bin/sage-download-file

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ except ImportError:
2424
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
2525
import sage_bootstrap
2626

27-
from sage_bootstrap.cmdline import SageDownloadFileApplication
28-
SageDownloadFileApplication().run()
27+
from sage_bootstrap.download.cmdline import run_safe
28+
run_safe()

build/bin/sage-logger

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
#!/usr/bin/env bash
22
#
3-
# sage-logger COMMAND LOGFILE
3+
# sage-logger [-p] COMMAND LOGFILE
44
#
55
# Evaluate shell command COMMAND while logging stdout and stderr to
66
# LOGFILE. If either the command or the logging failed, return a
77
# non-zero exit status.
88
#
9+
# If the -p argument is given, each line printed to stdout is prefixed
10+
# with the name of the log file.
11+
#
912
# AUTHOR:
1013
#
1114
# - Jeroen Demeyer (2015-07-26): initial version based on old pipestatus
@@ -20,16 +23,42 @@
2023
# http://www.gnu.org/licenses/
2124
#*****************************************************************************
2225

26+
use_prefix=false
27+
28+
if [[ "$1" = -p ]]; then
29+
use_prefix=true
30+
shift
31+
fi
32+
2333
cmd="$1"
2434
logfile="$2"
35+
logname="$(basename $logfile .log)"
2536
logdir=`dirname "$logfile"`
2637

38+
if [[ $use_prefix = true ]]; then
39+
prefix="[${logname}] "
40+
else
41+
prefix=""
42+
fi
43+
44+
# Use sed option to reduce buffering, to make the output appear more
45+
# smoothly. For GNU sed, this is the --unbuffered option.
46+
# For BSD sed (which is also on OS X), this is the -l option.
47+
if sed </dev/null 2>/dev/null --unbuffered ""; then
48+
SED="sed --unbuffered"
49+
elif sed </dev/null 2>/dev/null -l ""; then
50+
SED="sed -l"
51+
else
52+
SED="sed"
53+
fi
54+
2755
mkdir -p "$logdir"
2856

2957
# Redirect stdout and stderr to a subprocess running tee.
3058
# We trap SIGINT such that SIGINT interrupts the main process being
3159
# run, not the logging.
32-
( exec 2>&1; eval "$cmd" ) | ( trap '' SIGINT; tee -a "$logfile" )
60+
( exec 2>&1; eval "$cmd" ) | \
61+
( trap '' SIGINT; tee -a "$logfile" | $SED "s/^/$prefix/" )
3362

3463
pipestatus=(${PIPESTATUS[*]})
3564

build/bin/sage-package

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,5 @@ except ImportError:
3838
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
3939
import sage_bootstrap
4040

41-
from sage_bootstrap.cmdline import SagePkgApplication
42-
SagePkgApplication().run()
41+
from sage_bootstrap.cmdline import run
42+
run()

build/bin/sage-spkg

Lines changed: 22 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,8 @@ elif [ -z "$PKG_HAS_PATH" ]; then
272272
echo "that it will build correctly, or behave as expected."
273273
echo "Use at your own risk!"
274274
echo "==============================================================="
275-
read -p "Are you sure you want to continue [Y/n]? " answer
275+
echo "Are you sure you want to continue [Y/n]?"
276+
read -p "Answer: " answer
276277
case "$answer" in
277278
n*|N*) exit 0;;
278279
esac
@@ -365,7 +366,8 @@ if [ ! -f "$PKG_SRC" ]; then
365366
echo "For more information about making Sage packages, see"
366367
echo "http://doc.sagemath.org/html/en/developer/packaging.html"
367368
echo "=========================================================================="
368-
read -p "Are you sure you want to continue [Y/n]? " answer
369+
echo "Are you sure you want to continue [Y/n]?"
370+
read -p "Answer: " answer
369371
case "$answer" in
370372
n*|N*) exit 0;;
371373
esac
@@ -381,7 +383,8 @@ if [ ! -f "$PKG_SRC" ]; then
381383
echo "http://doc.sagemath.org/html/en/developer/packaging.html"
382384
echo "=========================================================================="
383385
echo
384-
read -t 30 -p "Are you sure (automatically continuing in 30 seconds) [Y/n]? " answer
386+
echo "Are you sure (automatically continuing in 30 seconds) [Y/n]?"
387+
read -t 30 -p "Answer: " answer
385388
case "$answer" in
386389
n*|N*) exit 0;;
387390
esac
@@ -520,44 +523,36 @@ fi
520523
##################################################################
521524

522525
if [ "$USE_LOCAL_SCRIPTS" = yes ]; then
526+
# New-style package
523527
echo "Setting up build directory for $PKG_NAME"
524528
cp -Rp "$PKG_SCRIPTS" "$PKG_NAME"
525529
cd "$PKG_NAME" || exit $?
530+
531+
sage-uncompress-spkg -d src "$PKG_SRC"
532+
if [ $? -ne 0 ]; then
533+
echo >&2 "Error: failed to extract $PKG_SRC"
534+
exit 1
535+
fi
526536
else
537+
# Old-style package (deprecated)
527538
echo "Extracting package $PKG_SRC"
528539
ls -l "$PKG_SRC"
529-
fi
530540

531-
sage-uncompress-spkg "$PKG_SRC"
532-
if [ $? -ne 0 ]; then
533-
echo >&2 "Error: failed to extract $PKG_SRC"
534-
exit 1
535-
fi
536-
537-
if [ "$USE_LOCAL_SCRIPTS" = yes ]; then
538-
shopt -s nocaseglob # see trac:16415
539-
# Strip file extension from the archive file and hope (as per
540-
# automake standards) that this is the same as the directory name
541-
# inside; move the directory to "src". (This goes wrong for
542-
# upstream package archives that have been renamed to appease some
543-
# other Sage script, such as "latte-int", whose archive is renamed
544-
# to "latte_int".)
545-
mv "$(echo "$PKG_NAME_UPSTREAM" | sed 's/\.zip$//g;s/\.tgz$//g;s/\.tar\.gz$//g;s/\.tar\.xz$//g;s/\.tar\.lz$//g;s/\.tar\.bz2$//g;s/\.tar$//g')"* src
546-
# Do not check for errors here; the "mv" fails in the situation
547-
# mentioned above, and the package-specific script needs to do
548-
# this work itself.
549-
shopt -u nocaseglob
550-
echo "Finished set up"
551-
else
552-
echo "Finished extraction"
541+
sage-uncompress-spkg "$PKG_SRC"
542+
if [ $? -ne 0 ]; then
543+
echo >&2 "Error: failed to extract $PKG_SRC"
544+
exit 1
545+
fi
553546

554547
cd "$PKG_NAME"
555548
if [ $? -ne 0 ]; then
556-
echo >&2 "Error: after extracting, the directory $PKG_NAME does not exist"
549+
echo >&2 "Error: after extracting, the directory '$PKG_NAME' does not exist"
557550
exit 1
558551
fi
559552
fi
560553

554+
echo "Finished extraction"
555+
561556
##################################################################
562557
# The package has been extracted, prepare for installation
563558
##################################################################

build/bin/sage-uncompress-spkg

Lines changed: 19 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,23 @@
11
#!/usr/bin/env python
22

3-
# USAGE:
4-
#
5-
# sage-uncompress-spkg PKG [FILE]
6-
#
7-
# With a single argument, unpack the file PKG to the current directory.
8-
#
9-
# If FILE is specified, extract FILE from PKG and send it to
10-
# stdout. (This option is present only for backwards compatibility:
11-
# printing the SPKG.txt file from an old-style spkg.)
3+
# usage: sage-uncompress-spkg [-h] [-d DIR] PKG [FILE]
4+
#
5+
# positional arguments:
6+
# PKG the archive to extract
7+
# FILE (deprecated) print the contents of the given archive member to
8+
# stdout
9+
#
10+
# optional arguments:
11+
# -h, --help show this help message and exit
12+
# -d DIR directory to extract archive contents into
1213

13-
import sys
14-
import tarfile
15-
import zipfile
1614

17-
if __name__ == '__main__':
18-
filename = sys.argv[1]
19-
if tarfile.is_tarfile(filename):
20-
# tar file, possibly compressed:
21-
archive = tarfile.open(filename, 'r:*')
22-
if len(sys.argv) == 2:
23-
archive.extractall()
24-
else:
25-
member = sys.argv[2]
26-
if member in archive.getnames():
27-
SPKG_TXT = archive.extractfile(member)
28-
sys.stdout.write(SPKG_TXT.read())
29-
exit(1)
30-
archive.close()
31-
exit(0)
32-
if zipfile.is_zipfile(filename):
33-
# zip file:
34-
archive = zipfile.ZipFile(filename, 'r')
35-
if len(sys.argv) == 2:
36-
archive.extractall()
37-
else:
38-
member = sys.argv[2]
39-
if member in archive.namelist():
40-
sys.stdout.write(archive.read(member))
41-
else:
42-
exit(1)
43-
archive.close()
44-
exit(0)
45-
else:
46-
print ('Error: Unknown file type: {}'.format(filename))
47-
exit(1)
15+
try:
16+
import sage_bootstrap
17+
except ImportError:
18+
import os, sys
19+
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
20+
import sage_bootstrap
21+
22+
from sage_bootstrap.uncompress.cmdline import run
23+
run()

build/make/deps

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ sagelib: \
149149
$(EXTCODE)
150150
if [ -z "$$SAGE_INSTALL_FETCH_ONLY" ]; then \
151151
cd $(SAGE_SRC) && source bin/sage-env && \
152-
sage-logger 'time $(MAKE) sage' '$(SAGE_LOGS)/sagelib-$(SAGE_VERSION).log'; \
152+
sage-logger -p 'time $(MAKE) sage' '$(SAGE_LOGS)/sagelib-$(SAGE_VERSION).log'; \
153153
fi
154154

155155

@@ -192,28 +192,28 @@ DOC_DEPENDENCIES = sagelib $(inst_sphinx) $(inst_sagenb) \
192192
| $(SAGERUNTIME) $(inst_maxima) $(inst_networkx) $(inst_scipy) \
193193
$(inst_matplotlib) $(inst_pillow) $(inst_mathjax) $(inst_mpmath) \
194194
$(inst_ipykernel) $(inst_jupyter_client) $(inst_conway_polynomials) \
195-
$(inst_tachyon)
195+
$(inst_tachyon) $(inst_jmol)
196196

197197
doc: doc-html
198198

199199
doc-html: $(DOC_DEPENDENCIES)
200-
cd ../.. && sage-logger './sage --docbuild --no-pdf-links all html $(SAGE_DOCBUILD_OPTS)' logs/dochtml.log
200+
cd ../.. && sage-logger -p './sage --docbuild --no-pdf-links all html $(SAGE_DOCBUILD_OPTS)' logs/dochtml.log
201201

202202
# 'doc-html-no-plot': build docs without building the graphics coming
203203
# from the '.. plot' directive, in case you want to save a few
204204
# megabytes of disk space. 'doc-clean' is a prerequisite because the
205205
# presence of graphics is cached in src/doc/output.
206206
doc-html-no-plot: doc-clean $(DOC_DEPENDENCIES)
207-
cd ../.. && sage-logger './sage --docbuild --no-pdf-links --no-plot all html $(SAGE_DOCBUILD_OPTS)' logs/dochtml.log
207+
cd ../.. && sage-logger -p './sage --docbuild --no-pdf-links --no-plot all html $(SAGE_DOCBUILD_OPTS)' logs/dochtml.log
208208

209209
doc-html-mathjax: $(DOC_DEPENDENCIES)
210-
cd ../.. && sage-logger './sage --docbuild --no-pdf-links all html -j $(SAGE_DOCBUILD_OPTS)' logs/dochtml.log
210+
cd ../.. && sage-logger -p './sage --docbuild --no-pdf-links all html -j $(SAGE_DOCBUILD_OPTS)' logs/dochtml.log
211211

212212
# Keep target 'doc-html-jsmath' for backwards compatibility.
213213
doc-html-jsmath: doc-html-mathjax
214214

215215
doc-pdf: $(DOC_DEPENDENCIES)
216-
cd ../.. && sage-logger './sage --docbuild all pdf $(SAGE_DOCBUILD_OPTS)' logs/docpdf.log
216+
cd ../.. && sage-logger -p './sage --docbuild all pdf $(SAGE_DOCBUILD_OPTS)' logs/docpdf.log
217217

218218
doc-clean: doc-src-clean doc-output-clean
219219

build/pkgs/4ti2/dependencies

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
zlib $(MP_LIBRARY) glpk
2+
3+
----------
4+
All lines of this file are ignored except the first.
5+
It is copied by SAGE_ROOT/build/make/install into SAGE_ROOT/build/make/Makefile.

0 commit comments

Comments
 (0)