Skip to content

Commit 18cb712

Browse files
author
Matthias Koeppe
committed
Merge remote-tracking branch 'upstream/develop' into sagemath_standard_pyproject_toml
2 parents 90c16ff + 8ea5214 commit 18cb712

File tree

1,078 files changed

+9445
-7947
lines changed

Some content is hidden

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

1,078 files changed

+9445
-7947
lines changed

.ci/create-changes-html.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ echo '<script>hljs.highlightAll();</script>' >> CHANGES.html
1919
cat >> CHANGES.html << EOF
2020
<script>
2121
document.addEventListener('DOMContentLoaded', () => {
22+
const baseDocURL = 'https://sagemath.netlify.app'
2223
const diffSite = 'https://pianomister.github.io/diffsite'
23-
const baseDocURL = 'https://sagemath-tobias.netlify.app'
2424
const diffParagraphs = document.querySelectorAll('p.diff');
2525
diffParagraphs.forEach(paragraph => {
2626
const rootURL = window.location.origin;

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.4.beta1
7+
version: 10.4.beta2
88
doi: 10.5281/zenodo.593563
9-
date-released: 2024-03-31
9+
date-released: 2024-04-08
1010
repository-code: "https://github.com/sagemath/sage"
1111
url: "https://www.sagemath.org/"

Makefile

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,6 @@ reconfigure:
7878
exit 1; \
7979
fi
8080

81-
# This is used to monitor progress towards Python 3 and prevent
82-
# regressions. Should be removed after the full switch to python3.
83-
#
84-
# As of Sage 9.0: keep the build target for backward compatibility,
85-
# but it just runs "make".
86-
buildbot-python3:
87-
$(MAKE)
88-
8981
# Preemptively download all source tarballs of normal packages.
9082
download:
9183
export SAGE_ROOT=$$(pwd) && \
@@ -343,15 +335,15 @@ CONFIGURE_DEPENDENCIES = \
343335
build/pkgs/*/spkg-configure.m4 \
344336
build/pkgs/*/type build/pkgs/*/SPKG.rst \
345337
build/pkgs/*/checksums.ini build/pkgs/*/requirements.txt \
346-
build/pkgs/*/install-requires.txt build/pkgs/*/package-version.txt \
338+
build/pkgs/*/version_requirements.txt build/pkgs/*/package-version.txt \
347339
build/pkgs/*/spkg-install build/pkgs/*/spkg-install.in
348340

349341
# SPKG_INFO_DEPENDENCIES is the list of files that influence the run of 'sage-spkg-info' and hence
350342
# the generation of the files generated in 'src/doc' by 'src/doc/bootstrap'.
351343
SPKG_INFO_DEPENDENCIES = \
352344
build/pkgs/*/type build/pkgs/*/SPKG.rst \
353345
build/pkgs/*/requirements.txt \
354-
build/pkgs/*/install-requires.txt build/pkgs/*/package-version.txt \
346+
build/pkgs/*/version_requirements.txt build/pkgs/*/package-version.txt \
355347
build/pkgs/*/distros/*.txt
356348

357349
configure: bootstrap src/doc/bootstrap $(CONFIGURE_DEPENDENCIES) $(SPKG_INFO_DEPENDENCIES)
@@ -376,5 +368,5 @@ list:
376368
misc-clean bdist-clean distclean bootstrap-clean maintainer-clean \
377369
test check testoptional testall testlong testoptionallong testallong \
378370
ptest ptestoptional ptestall ptestlong ptestoptionallong ptestallong \
379-
buildbot-python3 list \
371+
list \
380372
doc-clean clean sagelib-clean build-clean

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ obtaining Sage from a package manager, using a container image, or using
5252
Sage in the cloud.
5353

5454
**This README contains self-contained instructions for building Sage from source.**
55-
It assumes that you have already cloned the git repository or downloaded the
55+
This requires you to clone the git repository (as described in this README) or download the
5656
[sources](https://www.sagemath.org/download-source.html) in the form
5757
of a tarball.
5858

@@ -123,7 +123,7 @@ read the following step-by-step instructions for building Sage.
123123
The instructions cover all of Linux, macOS, and WSL.
124124

125125
More details, providing a background for these instructions, can be found
126-
in the [section "Install from Source Code"](https://doc.sagemath.org/html/en/installation/source.html).
126+
in the section [Install from Source Code](https://doc.sagemath.org/html/en/installation/source.html)
127127
in the Installation Guide.
128128

129129

@@ -424,9 +424,9 @@ in the Installation Guide.
424424
$ sudo ln -s $(./sage -sh -c 'ls $SAGE_ROOT/venv/bin/sage') /usr/local/bin
425425

426426
21. Optional: Set up SageMath as a Jupyter kernel in an existing Jupyter notebook
427-
or JupyterLab installation, as described in [section
428-
"Launching SageMath"](https://doc.sagemath.org/html/en/installation/launching.html)
429-
in the Sage Installation Manual.
427+
or JupyterLab installation, as described in the section
428+
[Launching SageMath](https://doc.sagemath.org/html/en/installation/launching.html)
429+
in the Sage Installation Guide.
430430

431431
Alternative Installation using PyPI
432432
---------------

VERSION.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
SageMath version 10.4.beta1, Release Date: 2024-03-31
1+
SageMath version 10.4.beta2, Release Date: 2024-04-08

bootstrap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ EOF
105105
SPKG_TREE_VAR="$(sed "s/#.*//;" "$DIR/trees.txt")"
106106
else
107107
SPKG_TREE_VAR=SAGE_LOCAL
108-
if test -f "$DIR/requirements.txt" -o -f "$DIR/install-requires.txt"; then
108+
if test -f "$DIR/requirements.txt" -o -f "$DIR/version_requirements.txt"; then
109109
# A Python package
110110
SPKG_TREE_VAR=SAGE_VENV
111111
echo "define(>>>SPKG_INSTALL_REQUIRES_${pkgname}<<<, >>>$(echo $(sage-get-system-packages install-requires ${pkgname}))<<<)dnl" >> m4/sage_spkg_versions.m4

bootstrap-conda

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,11 +132,11 @@ echo >&2 $0:$LINENO: generate conda environment files
132132
(
133133
echo >&4 " - pip:"
134134
echo >&5 " - pip:"
135-
for PKG_BASE in $(sage-package list :standard: :optional: --has-file requirements.txt --no-file distros/conda.txt --no-file src; sage-package list :standard: :optional: --has-file install-requires.txt --no-file requirements.txt --no-file distros/conda.txt --no-file src); do
135+
for PKG_BASE in $(sage-package list :standard: :optional: --has-file requirements.txt --no-file distros/conda.txt --no-file src; sage-package list :standard: :optional: --has-file version_requirements.txt --no-file requirements.txt --no-file distros/conda.txt --no-file src); do
136136
PKG_SCRIPTS=build/pkgs/$PKG_BASE
137137
SYSTEM_PACKAGES_FILE=$PKG_SCRIPTS/requirements.txt
138138
if [ ! -f $SYSTEM_PACKAGES_FILE ]; then
139-
SYSTEM_PACKAGES_FILE=$PKG_SCRIPTS/install-requires.txt
139+
SYSTEM_PACKAGES_FILE=$PKG_SCRIPTS/version_requirements.txt
140140
fi
141141
PKG_TYPE=$(cat $PKG_SCRIPTS/type)
142142
if grep -q SAGERUNTIME $PKG_SCRIPTS/dependencies $PKG_SCRIPTS/dependencies_order_only 2>/dev/null; then

build/bin/sage-dist-helpers

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,8 +323,13 @@ sdh_store_wheel() {
323323
wheel_basename="${wheel##*/}"
324324
distname="${wheel_basename%%-*}"
325325
# Record name and wheel file location
326+
if [ -n "$SAGE_DESTDIR" ]; then
327+
echo "Staged wheel file, staged ${SAGE_SPKG_SCRIPTS}/${PKG_BASE}/spkg-requirements.txt"
328+
else
329+
echo "Copied wheel file, wrote ${SAGE_SPKG_SCRIPTS}/${PKG_BASE}/spkg-requirements.txt"
330+
fi
326331
mkdir -p ${SAGE_DESTDIR}${SAGE_SPKG_SCRIPTS}/${PKG_BASE}
327-
echo "${distname} @ file://${wheel}" >> ${SAGE_DESTDIR}${SAGE_SPKG_SCRIPTS}/${PKG_BASE}/spkg-requirements.txt
332+
echo "${distname} @ file://${wheel}" >> "${SAGE_DESTDIR}${SAGE_SPKG_SCRIPTS}/${PKG_BASE}/spkg-requirements.txt"
328333
fi
329334
wheel="${SAGE_DESTDIR}${wheel}"
330335
}
@@ -392,7 +397,7 @@ sdh_actually_pip_install_wheel() {
392397
# of sage-conf, sage-setup, etc.) bump the version number, we need to
393398
# override this behavior. The pip install option --force-reinstall does too
394399
# much -- it also reinstalls all dependencies, which we do not want.
395-
$sudo sage-pip-uninstall "$distname"
400+
$sudo sage-pip-uninstall "$distname" 2>&1 | sed '/^WARNING: Skipping .* as it is not installed./d'
396401
if [ $? -ne 0 ]; then
397402
echo "(ignoring error)" >&2
398403
fi

build/bin/sage-get-system-packages

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,21 @@ fi
1414

1515
case "$SYSTEM" in
1616
install-requires)
17-
# Collect install-requires.txt (falling back to requirements.txt) and output it in the format
18-
# needed by setup.cfg [options] install_requires=
19-
SYSTEM_PACKAGES_FILE_NAMES="install-requires.txt requirements.txt"
17+
# Collect version_requirements.txt (falling back to requirements.txt) and output it in the format
18+
# needed by setup.cfg [options] version_requirements=
19+
SYSTEM_PACKAGES_FILE_NAMES="version_requirements.txt requirements.txt"
2020
STRIP_COMMENTS="sed s/#.*//;/^[[:space:]]*$/d;"
2121
COLLECT=
2222
;;
2323
install-requires-toml)
24-
# Collect install-requires.txt (falling back to requirements.txt) and output it in the format
24+
# Collect version_requirements.txt (falling back to requirements.txt) and output it in the format
2525
# needed by pyproject.toml [build-system] requires=
26-
SYSTEM_PACKAGES_FILE_NAMES="install-requires.txt requirements.txt"
26+
SYSTEM_PACKAGES_FILE_NAMES="version_requirements.txt requirements.txt"
2727
STRIP_COMMENTS="sed s/#.*//;/^[[:space:]]*$/d;s/^/'/;s/$/',/;"
2828
COLLECT=
2929
;;
3030
pip)
31-
SYSTEM_PACKAGES_FILE_NAMES="requirements.txt install-requires.txt"
31+
SYSTEM_PACKAGES_FILE_NAMES="requirements.txt version_requirements.txt"
3232
STRIP_COMMENTS='sed s/#.*//;s/[[:space:]]//g;'
3333
COLLECT=echo
3434
;;

build/bin/sage-logger

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,25 @@ else
6161
SED=cat
6262
fi
6363

64+
timefile="$logdir/$logname.time"
65+
rm -f "$timefile"
66+
if /usr/bin/time -h -o /dev/null true; then
67+
TIME="/usr/bin/time -h -o $timefile"
68+
else
69+
TIME=""
70+
fi
71+
72+
report_time ()
73+
{
74+
time=$(echo $(cat $timefile))
75+
case "$time" in
76+
*m*real*|*h*real*|*[1-9][0-9].*real*|*[1-9][0-9],*real*)
77+
# at least 10 seconds wall time
78+
echo "$time"
79+
;;
80+
esac
81+
}
82+
6483
mkdir -p "$logdir"
6584

6685
# Do all logging of child processes with V=1 to ensure that no
@@ -75,22 +94,30 @@ if [ -n "$SAGE_SILENT_BUILD" -a ${use_prefix} = true ]; then
7594
# Silent build.
7695
# Similar to https://www.gnu.org/software/automake/manual/html_node/Automake-Silent-Rules.html#Automake-Silent-Rules
7796
echo "[$logname] installing. Log file: $logfile"
78-
( exec>> $logfile 2>&1 ; eval "$cmd" )
97+
( exec>> $logfile 2>&1 ; $TIME sh -c "$cmd"; status=$?;
98+
[ -r $timefile ] && cat $timefile; exit $status )
7999
status=$?
80100
if [[ $status != 0 ]]; then
81101
echo " [$logname] error installing, exit status $status. End of log file:"
82102
tail -n 120 "$logfile" | sed "/Please email sage-devel/,$ d;s;^; [$logname] ;" >&2
83103
echo " [$logname] Full log file: $logfile"
84104
else
85-
echo " [$logname] successfully installed."
105+
time=$(report_time)
106+
if [ -n "$time" ]; then
107+
echo " [$logname] successfully installed ($time)."
108+
else
109+
echo " [$logname] successfully installed."
110+
fi
86111
fi
87112
exit $status
88113
else
89114
# Redirect stdout and stderr to a subprocess running tee.
90115
# We trap SIGINT such that SIGINT interrupts the main process being
91116
# run, not the logging.
92117

93-
( exec 2>&1; eval "$cmd" ) | \
118+
( exec 2>&1;
119+
$TIME sh -c "$cmd"; status=$?; report_time;
120+
exit $status ) | \
94121
( trap '' SIGINT; if [ -n "$GITHUB_ACTIONS" -a -n "$prefix" ]; then echo "::group::${logname}"; fi; tee -a "$logfile" | $SED; if [ -n "$GITHUB_ACTIONS" -a -n "$prefix" ]; then echo "::endgroup::"; fi )
95122

96123
pipestatus=(${PIPESTATUS[*]})

0 commit comments

Comments
 (0)