Skip to content

Commit 4fe1a56

Browse files
committed
Merge tag '7.5' into t/21295/sequences/recognizable
SageMath version 7.5 * tag '7.5': (2022 commits) Updated SageMath version to 7.5 Updated SageMath version to 7.5.rc3 Use a deterministic sorting key for number fields Updated SageMath version to 7.5.rc2 22136: pkg version/chksum Upgrade to Python 2.7.13 Updated SageMath version to 7.5.rc1 amending coment and message in setup.py Move autogen to a more appropriate location. 22095: better doctest run tests only in spkg-check. Also run spkg-check with the same options as spkg-install SAGERUNTIME requires psutil 22095: zero should be zero Revert "Stronger C typing for Singular ring order." Remove backported patch as it needs further patching... Gracefully handle closing of stdin in Singular. Upstream patch for GB over rings. New name for QQ in singular. Backport new functions for ring name printing. Otherwise debug mode cries. Backport Singular 4-2-0 patch. Not needed now but we'll have to deal with this. ...
2 parents c9c3408 + a0ef507 commit 4fe1a56

File tree

2,020 files changed

+79075
-32909
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,020 files changed

+79075
-32909
lines changed

.dir-locals.el

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
;;; Directory Local Variables
2+
;;; For more information see (info "(emacs) Directory Variables")
3+
4+
((nil
5+
;; Use space instead of tabs for indentation
6+
(indent-tabs-mode . nil))
7+
(makefile-mode
8+
;; But use tabs in Makefiles
9+
(indent-tabs-mode . t)))

COPYING.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ free open source license as defined at http://www.opensource.org/.
88
The whole Sage software distribution is licensed under the General
99
Public License, version 3 (no other versions!).
1010

11+
All Sage documentation is licensed under Creative Commons 3.0 BY-SA
12+
License.
13+
1114
Some of the code available in *optional* Sage packages (not included
1215
in sage-*.tar) are licensed under more restrictive conditions.
1316

VERSION.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
SageMath version 7.4.beta2, Release Date: 2016-08-26
1+
SageMath version 7.5, Release Date: 2017-01-11

bootstrap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ MAKE="${MAKE:-make}"
2626
CONFVERSION=`cat $PKG/package-version.txt`
2727

2828
bootstrap () {
29+
# Get autotools from our own package into PATH (Trac #21214)
30+
source src/bin/sage-env
2931
aclocal -I m4 && \
3032
automake --add-missing --copy build/make/Makefile-auto && \
3133
autoconf

build/README.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
This directory contains the build system of Sage, the distribution.
2+
3+
Subdirectories:
4+
5+
- bin: Various scripts needed at build time. Not installed.
6+
7+
- make: Makefiles and related scripts.
8+
9+
- pkgs: New-style sage packages.
10+
11+
- sage_bootstrap: Python utility library for dealing with
12+
third-party tarballs and building Sage. See its README for
13+
more information. Not installed.
14+
15+
- test: Test suite for sage_bootstrap.

build/bin/sage-apply-patches

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
#!/usr/bin/env bash
2+
#
3+
# sage-apply-patches [-p<num>] [-d patch-subdir] [patch-dir] -- [...]
4+
#
5+
# Apply any patches to original spkg sources. Patch files must have
6+
# the .patch extension.
7+
#
8+
# By default the patches are applied from ../patches/ using the -p1
9+
# option, and it is assumed that the patches are being applied from
10+
# the root of the package source.
11+
#
12+
# An optional patch subdirectory may be specified with the -d flag.
13+
# For example `sage-apply-patches -d cygwin` applies only those
14+
# patches under <patch-dir>/cygwin.
15+
#
16+
# The -p<num> arg is the argument accepted by the `patch` command,
17+
# and overrides the default -p1
18+
#
19+
# Any additional arguments following " -- " are passed directly
20+
# to the `patch` command.
21+
#
22+
#***************************************************************************
23+
#
24+
# Distributed under the terms of the GNU General Public License (GPL)
25+
# as published by the Free Software Foundation; either version 2 of
26+
# the License, or (at your option) any later version.
27+
# http://www.gnu.org/licenses/
28+
#***************************************************************************
29+
30+
patchdir="../patches"
31+
patch_subdir=""
32+
patch_strip="-p1"
33+
patch_args_sep=""
34+
patch_args="--no-backup-if-mismatch"
35+
36+
while [[ $# > 0 ]]; do
37+
if [[ -z "$patch_args_sep" ]]; then
38+
case $1 in
39+
-d)
40+
patch_subdir="${2%/}"
41+
shift
42+
;;
43+
-p[0-9])
44+
patch_strip="$1"
45+
;;
46+
--)
47+
patch_args_sep="$1"
48+
;;
49+
*)
50+
patchdir="${1%/}"
51+
;;
52+
esac
53+
else
54+
patch_args="$patch_args $1"
55+
fi
56+
57+
shift
58+
done
59+
60+
patchdir="${patchdir}/${patch_subdir}"
61+
patchdir="${patchdir%/}"
62+
patches=( "${patchdir}"/*.patch )
63+
64+
if [[ -r "${patches[0]}" ]]; then
65+
echo "Applying patches from ${patchdir}..."
66+
for patch in ${patches[@]}; do
67+
# Skip non-existing or non-readable patches
68+
[ -r "$patch" ] || continue
69+
echo "Applying $patch"
70+
patch $patch_strip $patch_args < "$patch"
71+
if [ $? -ne 0 ]; then
72+
echo >&2 "Error applying '$patch'"
73+
exit 1
74+
fi
75+
done
76+
else
77+
>&2 echo "No patch files found in $patchdir"
78+
fi

build/bin/sage-logger

Lines changed: 39 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -44,26 +44,50 @@ fi
4444
# Use sed option to reduce buffering, to make the output appear more
4545
# smoothly. For GNU sed, this is the --unbuffered option.
4646
# 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"
47+
if [ -n "$prefix" ]; then
48+
if sed </dev/null 2>/dev/null --unbuffered ""; then
49+
SED="sed --unbuffered"
50+
elif sed </dev/null 2>/dev/null -l ""; then
51+
SED="sed -l"
52+
else
53+
SED="sed"
54+
fi
55+
56+
# eval needed to get the quoting around the regexp right
57+
SED="eval $SED 's/^/$prefix/'"
5158
else
52-
SED="sed"
59+
# Make SED a useless use of cat
60+
SED=cat
5361
fi
5462

5563
mkdir -p "$logdir"
5664

57-
# Redirect stdout and stderr to a subprocess running tee.
58-
# We trap SIGINT such that SIGINT interrupts the main process being
59-
# run, not the logging.
60-
( exec 2>&1; eval "$cmd" ) | \
61-
( trap '' SIGINT; tee -a "$logfile" | $SED "s/^/$prefix/" )
65+
if [[ "$V" = 0 && $use_prefix = true ]]; then
66+
# Silent build.
67+
# Similar to https://www.gnu.org/software/automake/manual/html_node/Automake-Silent-Rules.html#Automake-Silent-Rules
68+
echo "[$logname] installing. Log file: $logfile"
69+
# Use verbose mode for output to logfiles.
70+
export V=1
71+
( exec>> $logfile 2>&1 ; eval "$cmd" )
72+
status=$?
73+
if [[ $status != 0 ]]; then
74+
echo " [$logname] error installing, exit status $status. Log file: $logfile"
75+
else
76+
echo " [$logname] successfully installed."
77+
fi
78+
exit $status
79+
else
80+
# Redirect stdout and stderr to a subprocess running tee.
81+
# We trap SIGINT such that SIGINT interrupts the main process being
82+
# run, not the logging.
83+
( exec 2>&1; eval "$cmd" ) | \
84+
( trap '' SIGINT; tee -a "$logfile" | $SED )
6285

63-
pipestatus=(${PIPESTATUS[*]})
86+
pipestatus=(${PIPESTATUS[*]})
6487

65-
if [ ${pipestatus[1]} -ne 0 ]; then
66-
exit ${pipestatus[1]}
67-
else
68-
exit ${pipestatus[0]}
88+
if [ ${pipestatus[1]} -ne 0 ]; then
89+
exit ${pipestatus[1]}
90+
else
91+
exit ${pipestatus[0]}
92+
fi
6993
fi

build/bin/sage-pip-install

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
#!/usr/bin/env bash
2+
# This command is specifically for pip-installing from a local
3+
# source directory, as opposed to from a package index via package
4+
# name. That is, it is for pip-installing Sage spkgs from their
5+
# extracted upstream sources.
6+
#
7+
# This ensures that any previous installations of the same package
8+
# are uninstalled first.
9+
10+
# Default arguments for all packages installed with `pip install`
11+
# --ignore-installed : Force pip to re-install package even if it thinks it's
12+
# already installed (for which it sometimes gets false
13+
# positives for partially-installed packages).
14+
# --verbose : Display the output when running setup.py.
15+
# --no-deps : Don't install runtime dependencies from PyPI.
16+
# --no-index : Don't look at the package index.
17+
# This also disables pip's version self-check.
18+
pip_install_flags="--ignore-installed --verbose --no-deps --no-index"
19+
20+
# Consume any additional pip install arguments except the last one
21+
while [ $# -gt 1 ]; do
22+
pip_install_flags="$pip_install_flags $1"
23+
shift
24+
done
25+
26+
# Last argument must be "." and will be ignored
27+
if [ "$1" != "." ]; then
28+
echo >&2 "$0 requires . as final argument"
29+
exit 1
30+
fi
31+
32+
# Find out the name of the package that we are installing
33+
name="$(python setup.py --name)"
34+
35+
if [ $? -ne 0 ]; then
36+
echo >&2 "Error: could not determine package name"
37+
exit 1
38+
fi
39+
40+
if [ $(echo "$name" | wc -l) -gt 1 ]; then
41+
name="$(echo "$name" | tail -1)"
42+
echo >&2 "Warning: This package has a badly-behaved setup.py which outputs"
43+
echo >&2 "more than the package name for 'setup.py --name'; using the last"
44+
echo >&2 "line as the package name: $name"
45+
fi
46+
47+
# We should avoid running pip while uninstalling a package because that
48+
# is prone to race conditions. Therefore, we use a lockfile while
49+
# running pip. This is implemented in the Python script pip-lock.
50+
51+
# Keep uninstalling as long as it succeeds
52+
while true; do
53+
out=$(pip-lock uninstall --disable-pip-version-check -y "$name" 2>&1)
54+
if [ $? -ne 0 ]; then
55+
break
56+
fi
57+
echo "$out"
58+
done
59+
60+
# Not ideal, but this is the easiest way to check if the package
61+
# was not installed to begin with (which pip treats as an error).
62+
# If it wasn't, then we proceed quietly; if it was installed show the
63+
# uninstallation output and error out.
64+
if [[ "$out" != *"not installed" ]]; then
65+
echo >&2 "$out"
66+
exit 1
67+
fi
68+
69+
# Finally actually do the installation (the "SHARED" tells pip-lock
70+
# to apply a shared lock)
71+
echo "Installing package $name using pip"
72+
exec pip-lock SHARED install $pip_install_flags .

0 commit comments

Comments
 (0)