Skip to content

Commit bcc4317

Browse files
authored
Merge branch 'develop' into pep_E241_pyx
2 parents 32f7d9e + e249bef commit bcc4317

File tree

739 files changed

+5373
-3703
lines changed

Some content is hidden

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

739 files changed

+5373
-3703
lines changed

.github/workflows/doc-build-pdf.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
export PATH="build/bin:$PATH"
5858
eval $(sage-print-system-package-command auto update)
5959
eval $(sage-print-system-package-command auto --yes --no-install-recommends install zip)
60-
eval $(sage-print-system-package-command auto --spkg --yes --no-install-recommends install git texlive)
60+
eval $(sage-print-system-package-command auto --spkg --yes --no-install-recommends install git texlive texlive_luatex free_fonts xindy)
6161
6262
- name: Add prebuilt tree as a worktree
6363
id: worktree

.github/workflows/doc-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ jobs:
161161
export PATH="build/bin:$PATH"
162162
eval $(sage-print-system-package-command auto update)
163163
eval $(sage-print-system-package-command auto --yes --no-install-recommends install zip)
164-
eval $(sage-print-system-package-command auto --spkg --yes --no-install-recommends install git texlive)
164+
eval $(sage-print-system-package-command auto --spkg --yes --no-install-recommends install git texlive texlive_luatex free_fonts xindy)
165165
export SAGE_USE_CDNS=yes
166166
export SAGE_LIVE_DOC=yes
167167
export SAGE_JUPYTER_SERVER=binder:sagemath/sage-binder-env/dev

CITATION.cff

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ title: SageMath
44
abstract: SageMath is a free open-source mathematics software system.
55
authors:
66
- name: "The SageMath Developers"
7-
version: 10.3.beta3
7+
version: 10.3.beta4
88
doi: 10.5281/zenodo.593563
9-
date-released: 2023-12-18
9+
date-released: 2023-12-26
1010
repository-code: "https://github.com/sagemath/sage"
1111
url: "https://www.sagemath.org/"

VERSION.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
SageMath version 10.3.beta3, Release Date: 2023-12-18
1+
SageMath version 10.3.beta4, Release Date: 2023-12-26

build/bin/sage-dist-helpers

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ sdh_pip_install() {
244244
# Our default after #33789 (Sage 9.7): We allow the package to provision
245245
# its build environment using the stored wheels.
246246
# We pass --find-links.
247-
# The SPKG needs to declare "setuptools_wheel" as a dependency.
247+
# The SPKG needs to declare "setuptools" as a dependency.
248248
build_isolation_option="--find-links=$SAGE_SPKG_WHEELS"
249249
;;
250250
--no-build-isolation)

build/bin/sage-get-system-packages

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ case "$SYSTEM" in
4141
fi
4242
fi
4343
SYSTEM_PACKAGES_FILE_NAMES="distros/$SYSTEM.txt"
44-
STRIP_COMMENTS="sed s/#.*//;"
44+
STRIP_COMMENTS="sed s/#.*//;s/\${PYTHON_MINOR}/${PYTHON_MINOR}/g"
4545
COLLECT=echo
4646
;;
4747
esac

build/bin/sage-guess-package-system

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ if conda --version > /dev/null 2>&1; then
1111
fi
1212
if brew --version > /dev/null 2>&1; then
1313
echo homebrew
14+
elif port version > /dev/null 2>&1; then
15+
echo macports
1416
elif emerge --version > /dev/null 2>&1; then
1517
echo gentoo
1618
elif apt-get --version > /dev/null 2>&1; then

build/bin/sage-print-system-package-command

Lines changed: 46 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,16 @@ do
3434
;;
3535
--prompt)
3636
PROMPT=' $ '
37+
CONTINUATION=' '
38+
;;
39+
--continuation=*)
40+
CONTINUATION="${1#--continuation=}"
41+
;;
42+
--wrap)
43+
WRAP=78
44+
;;
45+
--wrap=*)
46+
WRAP="${1#--wrap=}"
3747
;;
3848
--no-install-recommends)
3949
NO_INSTALL_RECOMMENDS=yes
@@ -79,7 +89,13 @@ function print_shell_command()
7989
echo ".. CODE-BLOCK:: bash"
8090
echo
8191
fi
82-
echo "${PROMPT}$1"
92+
# shell-quote arguments if necessary
93+
quoted=$(for a in "$@"; do printf "%q " $a; done)
94+
if [ -z "$WRAP" -o $# -lt 6 ]; then
95+
echo "${PROMPT}${quoted}"
96+
else
97+
sage-bootstrap-python -c "import textwrap; print(' \\\\\n'.join(textwrap.wrap(r'''${quoted}''', $WRAP, initial_indent=r'''${PROMPT}''', subsequent_indent=r'''${CONTINUATION}''', break_long_words=False, break_on_hyphens=False)))"
98+
fi
8399
if [ -n "$OUTPUT_RST" ]; then
84100
echo
85101
fi
@@ -102,77 +118,90 @@ case $system:$command in
102118
[ -n "$SAGE_ROOT" ] || SAGE_ROOT=.
103119
echo "${PROMPT}source $SAGE_ROOT/.homebrew-build-env"
104120
;;
121+
macports*:setup-build-env)
122+
$IF_VERBOSE echo "${COMMENT}"
123+
$IF_VERBOSE echo "${COMMENT}WARNING: Use of MacPorts is experimental"
124+
$IF_VERBOSE echo "${COMMENT}"
125+
$IF_VERBOSE echo "${COMMENT}MacPorts does not provide unversioned gfortran executables by default"
126+
$IF_VERBOSE echo "${COMMENT}To make gfortran available (and build with gcc from XCode), use:"
127+
$IF_VERBOSE echo "${COMMENT}"
128+
$IF_VERBOSE print_shell_command ./configure FC=gfortran-mp-11
129+
;;
105130
*:setup-build-env)
106131
# Nothing needed
107132
;;
108133
#
109134
# Verbs handled above are our own inventions. Verbs handled below are apt-get verbs.
110135
#
111136
@(debian*|ubuntu*):update)
112-
print_shell_command "${SUDO}apt-get $command $system_packages"
137+
print_shell_command ${SUDO}apt-get $command $system_packages
113138
;;
114139
@(debian*|ubuntu*):*)
115140
[ "$NO_INSTALL_RECOMMENDS" = yes ] && options="$options --no-install-recommends"
116141
[ "$YES" = yes ] && options="$options --yes" env="DEBIAN_FRONTEND=noninteractive "
117-
[ -n "$system_packages" ] && print_shell_command "${SUDO}${env}apt-get $command $options $system_packages"
142+
[ -n "$system_packages" ] && print_shell_command ${SUDO}${env}apt-get $command $options $system_packages
118143
;;
119144
@(fedora*|redhat*|centos*):install)
120145
[ "$YES" = yes ] && options="$options -y"
121-
[ -n "$system_packages" ] && print_shell_command "${SUDO}yum install $options $system_packages"
146+
[ -n "$system_packages" ] && print_shell_command ${SUDO}yum install $options $system_packages
122147
;;
123148
gentoo*:install)
124-
[ -n "$system_packages" ] && print_shell_command "${SUDO}emerge $system_packages"
149+
[ -n "$system_packages" ] && print_shell_command ${SUDO}emerge $system_packages
125150
;;
126151
arch*:update)
127152
print_shell_command "${SUDO}pacman -Sy"
128153
;;
129154
arch*:install)
130155
[ "$YES" = yes ] && options="$options --noconfirm"
131-
[ -n "$system_packages" ] && print_shell_command "${SUDO}pacman -S $options $system_packages"
156+
[ -n "$system_packages" ] && print_shell_command ${SUDO}pacman -S $options $system_packages
132157
;;
133158
void*:update)
134159
print_shell_command "${SUDO}xbps-install -Su"
135160
;;
136161
void*:install)
137162
[ "$YES" = yes ] && options="$options --yes"
138-
[ -n "$system_packages" ] && print_shell_command "${SUDO}xbps-install $options $system_packages"
163+
[ -n "$system_packages" ] && print_shell_command ${SUDO}xbps-install $options $system_packages
139164
;;
140165
opensuse*:install)
141-
[ -n "$system_packages" ] && print_shell_command "${SUDO}zypper install $system_packages"
166+
[ -n "$system_packages" ] && print_shell_command ${SUDO}zypper install $system_packages
142167
;;
143168
*conda*:install)
144169
[ "$YES" = yes ] && options="$options --yes"
145-
[ -n "$system_packages" ] && print_shell_command "conda install $options $system_packages"
170+
[ -n "$system_packages" ] && print_shell_command conda install $options $system_packages
146171
;;
147172
homebrew*:install)
148-
[ -n "$system_packages" ] && print_shell_command "brew install $system_packages"
173+
[ -n "$system_packages" ] && print_shell_command brew install $system_packages
174+
;;
175+
macports*:install)
176+
[ "$YES" = yes ] && options="$options -N"
177+
[ -n "$system_packages" ] && print_shell_command ${SUDO}port $options install $system_packages
149178
;;
150179
slackware*:install)
151-
[ -n "$system_packages" ] && print_shell_command "${SUDO}slackpkg install $system_packages"
180+
[ -n "$system_packages" ] && print_shell_command ${SUDO}slackpkg install $system_packages
152181
;;
153182
cygwin*:update)
154183
print_comment "first install apt-cyg from https://github.com/transcode-open/apt-cyg"
155184
;;
156185
cygwin*:install)
157-
[ -n "$system_packages" ] && print_shell_command "apt-cyg install $system_packages"
186+
[ -n "$system_packages" ] && print_shell_command apt-cyg install $system_packages
158187
;;
159188
freebsd*:install)
160-
[ -n "$system_packages" ] && print_shell_command "${SUDO}pkg install $system_packages"
189+
[ -n "$system_packages" ] && print_shell_command ${SUDO}pkg install $system_packages
161190
;;
162191
nix*:install)
163-
[ -n "$system_packages" ] && print_shell_command "nix-env --install $system_packages"
192+
[ -n "$system_packages" ] && print_shell_command nix-env --install $system_packages
164193
;;
165194
alpine:update)
166195
print_shell_command "apk update"
167196
;;
168197
alpine:install)
169-
[ -n "$system_packages" ] && print_shell_command "apk add $system_packages"
198+
[ -n "$system_packages" ] && print_shell_command apk add $system_packages
170199
;;
171200
pip:install)
172-
[ -n "$system_packages" ] && print_shell_command "sage -pip install $system_packages"
201+
[ -n "$system_packages" ] && print_shell_command sage -pip install $system_packages
173202
;;
174203
cpan:install)
175-
[ -n "$system_packages" ] && print_shell_command "cpan -i $system_packages"
204+
[ -n "$system_packages" ] && print_shell_command cpan -i $system_packages
176205
;;
177206
repology:install)
178207
if [ -n "$system_packages" ]; then

build/bin/sage-spkg

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,9 @@ else
509509
# just copy to dist/ and create a simple install script.
510510
mkdir -p dist
511511
cp "$PKG_SRC" dist/
512-
echo "sdh_store_and_pip_install_wheel ." > spkg-install.in
512+
if [ ! -f spkg-install.in ]; then
513+
echo "sdh_store_and_pip_install_wheel ." > spkg-install.in
514+
fi
513515
;;
514516
*)
515517
# Source tarball

build/bin/sage-spkg-info

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,26 @@
55
#
66
# Assumes SAGE_ROOT is set
77
PKG_BASE=$1
8+
if [ -n "$OUTPUT_DIR" ]; then
9+
exec > "$OUTPUT_DIR"/$PKG_BASE.rst
10+
fi
11+
if [ -n "$OUTPUT_RST" ]; then
12+
echo ".. _spkg_$PKG_BASE:"
13+
echo
14+
ref () { echo ":ref:\`$1\`"; }
15+
issue () { echo ":issue:\`$1\`"; }
16+
code () { echo "\`\`$*\`\`"; }
17+
else
18+
ref () { echo "$1"; }
19+
issue () { echo "https://github.com/sagemath/sage/issues/$1"; }
20+
code () { echo "$1"; }
21+
fi
822
PKG_SCRIPTS="$SAGE_ROOT/build/pkgs/$PKG_BASE"
923
for ext in rst txt; do
1024
SPKG_FILE="$PKG_SCRIPTS/SPKG.$ext"
1125
if [ -f "$SPKG_FILE" ]; then
12-
sed "1,3s/^ *Sage: Open Source Mathematics Software:/$PKG_BASE:/" "$SPKG_FILE"
26+
# for sphinx 4.4 we need to replace all direct links by some "extlink" (issue 33272)
27+
sed -e "1,3s/^ *Sage: Open Source Mathematics Software:/$PKG_BASE:/" -e "s|https://github.com/sagemath/sage/issues/\([0-9]*\)|:issue:\`\1\`|g" -e "s|https://arxiv.org/abs/cs/\([0-9]*\)|:arxiv:\`cs/\1\`|g" "$SPKG_FILE"
1328
break
1429
fi
1530
done
@@ -39,9 +54,9 @@ for dep_file in dependencies dependencies_order_only; do
3954
# Dependencies like $(BLAS)
4055
\$\(*) echo "- $dep";;
4156
# Looks like a package
42-
*) if [ -n "$OUTPUT_RST" -a -r "$SAGE_ROOT/build/pkgs/$dep/SPKG.rst" ]; then
57+
*) if [ -r "$SAGE_ROOT/build/pkgs/$dep/SPKG.rst" ]; then
4358
# This RST label is set in src/doc/bootstrap
44-
echo "- :ref:\`spkg_$dep\`"
59+
echo "- $(ref spkg_$dep)"
4560
else
4661
echo "- $dep"
4762
fi;;
@@ -103,7 +118,7 @@ for system in $systems; do
103118
echo "$system:"
104119
;;
105120
esac
106-
sage-print-system-package-command $system --prompt=' $ ' --sudo install $system_packages
121+
sage-print-system-package-command $system --wrap --prompt=' $ ' --continuation=' ' --sudo install $system_packages
107122
echo
108123
done
109124
if [ -z "$system" ]; then
@@ -114,15 +129,15 @@ else
114129
if [ -f "${SPKG_CONFIGURE}" ]; then
115130
if grep -q SAGE_PYTHON_PACKAGE_CHECK "${SPKG_CONFIGURE}"; then
116131
echo "If the system package is installed and if the (experimental) option"
117-
echo "--enable-system-site-packages is passed to ./configure, then ./configure"
132+
echo "$(code --enable-system-site-packages) is passed to $(code ./configure), then $(code ./configure)"
118133
echo "will check if the system package can be used."
119134
else
120-
echo "If the system package is installed, ./configure will check if it can be used."
135+
echo "If the system package is installed, $(code ./configure) will check if it can be used."
121136
fi
122137
else
123138
echo "However, these system packages will not be used for building Sage"
124-
echo "because spkg-configure.m4 has not been written for this package;"
125-
echo "see https://github.com/sagemath/sage/issues/27330"
139+
echo "because $(code spkg-configure.m4) has not been written for this package;"
140+
echo "see $(issue 27330)"
126141
fi
127142
fi
128143
echo

0 commit comments

Comments
 (0)