Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into sagemath_standar…
Browse files Browse the repository at this point in the history
…d_pyproject_toml
  • Loading branch information
Matthias Koeppe committed Apr 8, 2024
2 parents 90c16ff + 8ea5214 commit 18cb712
Show file tree
Hide file tree
Showing 1,078 changed files with 9,445 additions and 7,947 deletions.
2 changes: 1 addition & 1 deletion .ci/create-changes-html.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ echo '<script>hljs.highlightAll();</script>' >> CHANGES.html
cat >> CHANGES.html << EOF
<script>
document.addEventListener('DOMContentLoaded', () => {
const baseDocURL = 'https://sagemath.netlify.app'
const diffSite = 'https://pianomister.github.io/diffsite'
const baseDocURL = 'https://sagemath-tobias.netlify.app'
const diffParagraphs = document.querySelectorAll('p.diff');
diffParagraphs.forEach(paragraph => {
const rootURL = window.location.origin;
Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ title: SageMath
abstract: SageMath is a free open-source mathematics software system.
authors:
- name: "The SageMath Developers"
version: 10.4.beta1
version: 10.4.beta2
doi: 10.5281/zenodo.593563
date-released: 2024-03-31
date-released: 2024-04-08
repository-code: "https://github.com/sagemath/sage"
url: "https://www.sagemath.org/"
14 changes: 3 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,6 @@ reconfigure:
exit 1; \
fi

# This is used to monitor progress towards Python 3 and prevent
# regressions. Should be removed after the full switch to python3.
#
# As of Sage 9.0: keep the build target for backward compatibility,
# but it just runs "make".
buildbot-python3:
$(MAKE)

# Preemptively download all source tarballs of normal packages.
download:
export SAGE_ROOT=$$(pwd) && \
Expand Down Expand Up @@ -343,15 +335,15 @@ CONFIGURE_DEPENDENCIES = \
build/pkgs/*/spkg-configure.m4 \
build/pkgs/*/type build/pkgs/*/SPKG.rst \
build/pkgs/*/checksums.ini build/pkgs/*/requirements.txt \
build/pkgs/*/install-requires.txt build/pkgs/*/package-version.txt \
build/pkgs/*/version_requirements.txt build/pkgs/*/package-version.txt \
build/pkgs/*/spkg-install build/pkgs/*/spkg-install.in

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

configure: bootstrap src/doc/bootstrap $(CONFIGURE_DEPENDENCIES) $(SPKG_INFO_DEPENDENCIES)
Expand All @@ -376,5 +368,5 @@ list:
misc-clean bdist-clean distclean bootstrap-clean maintainer-clean \
test check testoptional testall testlong testoptionallong testallong \
ptest ptestoptional ptestall ptestlong ptestoptionallong ptestallong \
buildbot-python3 list \
list \
doc-clean clean sagelib-clean build-clean
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ obtaining Sage from a package manager, using a container image, or using
Sage in the cloud.

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

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

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


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

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

Alternative Installation using PyPI
---------------
Expand Down
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
SageMath version 10.4.beta1, Release Date: 2024-03-31
SageMath version 10.4.beta2, Release Date: 2024-04-08
2 changes: 1 addition & 1 deletion bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ EOF
SPKG_TREE_VAR="$(sed "s/#.*//;" "$DIR/trees.txt")"
else
SPKG_TREE_VAR=SAGE_LOCAL
if test -f "$DIR/requirements.txt" -o -f "$DIR/install-requires.txt"; then
if test -f "$DIR/requirements.txt" -o -f "$DIR/version_requirements.txt"; then
# A Python package
SPKG_TREE_VAR=SAGE_VENV
echo "define(>>>SPKG_INSTALL_REQUIRES_${pkgname}<<<, >>>$(echo $(sage-get-system-packages install-requires ${pkgname}))<<<)dnl" >> m4/sage_spkg_versions.m4
Expand Down
4 changes: 2 additions & 2 deletions bootstrap-conda
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,11 @@ echo >&2 $0:$LINENO: generate conda environment files
(
echo >&4 " - pip:"
echo >&5 " - pip:"
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
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
PKG_SCRIPTS=build/pkgs/$PKG_BASE
SYSTEM_PACKAGES_FILE=$PKG_SCRIPTS/requirements.txt
if [ ! -f $SYSTEM_PACKAGES_FILE ]; then
SYSTEM_PACKAGES_FILE=$PKG_SCRIPTS/install-requires.txt
SYSTEM_PACKAGES_FILE=$PKG_SCRIPTS/version_requirements.txt
fi
PKG_TYPE=$(cat $PKG_SCRIPTS/type)
if grep -q SAGERUNTIME $PKG_SCRIPTS/dependencies $PKG_SCRIPTS/dependencies_order_only 2>/dev/null; then
Expand Down
9 changes: 7 additions & 2 deletions build/bin/sage-dist-helpers
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,13 @@ sdh_store_wheel() {
wheel_basename="${wheel##*/}"
distname="${wheel_basename%%-*}"
# Record name and wheel file location
if [ -n "$SAGE_DESTDIR" ]; then
echo "Staged wheel file, staged ${SAGE_SPKG_SCRIPTS}/${PKG_BASE}/spkg-requirements.txt"
else
echo "Copied wheel file, wrote ${SAGE_SPKG_SCRIPTS}/${PKG_BASE}/spkg-requirements.txt"
fi
mkdir -p ${SAGE_DESTDIR}${SAGE_SPKG_SCRIPTS}/${PKG_BASE}
echo "${distname} @ file://${wheel}" >> ${SAGE_DESTDIR}${SAGE_SPKG_SCRIPTS}/${PKG_BASE}/spkg-requirements.txt
echo "${distname} @ file://${wheel}" >> "${SAGE_DESTDIR}${SAGE_SPKG_SCRIPTS}/${PKG_BASE}/spkg-requirements.txt"
fi
wheel="${SAGE_DESTDIR}${wheel}"
}
Expand Down Expand Up @@ -392,7 +397,7 @@ sdh_actually_pip_install_wheel() {
# of sage-conf, sage-setup, etc.) bump the version number, we need to
# override this behavior. The pip install option --force-reinstall does too
# much -- it also reinstalls all dependencies, which we do not want.
$sudo sage-pip-uninstall "$distname"
$sudo sage-pip-uninstall "$distname" 2>&1 | sed '/^WARNING: Skipping .* as it is not installed./d'
if [ $? -ne 0 ]; then
echo "(ignoring error)" >&2
fi
Expand Down
12 changes: 6 additions & 6 deletions build/bin/sage-get-system-packages
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,21 @@ fi

case "$SYSTEM" in
install-requires)
# Collect install-requires.txt (falling back to requirements.txt) and output it in the format
# needed by setup.cfg [options] install_requires=
SYSTEM_PACKAGES_FILE_NAMES="install-requires.txt requirements.txt"
# Collect version_requirements.txt (falling back to requirements.txt) and output it in the format
# needed by setup.cfg [options] version_requirements=
SYSTEM_PACKAGES_FILE_NAMES="version_requirements.txt requirements.txt"
STRIP_COMMENTS="sed s/#.*//;/^[[:space:]]*$/d;"
COLLECT=
;;
install-requires-toml)
# Collect install-requires.txt (falling back to requirements.txt) and output it in the format
# Collect version_requirements.txt (falling back to requirements.txt) and output it in the format
# needed by pyproject.toml [build-system] requires=
SYSTEM_PACKAGES_FILE_NAMES="install-requires.txt requirements.txt"
SYSTEM_PACKAGES_FILE_NAMES="version_requirements.txt requirements.txt"
STRIP_COMMENTS="sed s/#.*//;/^[[:space:]]*$/d;s/^/'/;s/$/',/;"
COLLECT=
;;
pip)
SYSTEM_PACKAGES_FILE_NAMES="requirements.txt install-requires.txt"
SYSTEM_PACKAGES_FILE_NAMES="requirements.txt version_requirements.txt"
STRIP_COMMENTS='sed s/#.*//;s/[[:space:]]//g;'
COLLECT=echo
;;
Expand Down
33 changes: 30 additions & 3 deletions build/bin/sage-logger
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,25 @@ else
SED=cat
fi

timefile="$logdir/$logname.time"
rm -f "$timefile"
if /usr/bin/time -h -o /dev/null true; then
TIME="/usr/bin/time -h -o $timefile"
else
TIME=""
fi

report_time ()
{
time=$(echo $(cat $timefile))
case "$time" in
*m*real*|*h*real*|*[1-9][0-9].*real*|*[1-9][0-9],*real*)
# at least 10 seconds wall time
echo "$time"
;;
esac
}

mkdir -p "$logdir"

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

( exec 2>&1; eval "$cmd" ) | \
( exec 2>&1;
$TIME sh -c "$cmd"; status=$?; report_time;
exit $status ) | \
( 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 )

pipestatus=(${PIPESTATUS[*]})
Expand Down
Loading

0 comments on commit 18cb712

Please sign in to comment.