Skip to content

Commit

Permalink
Merge branch 'develop' into conda-lock
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasdiez authored Dec 26, 2023
2 parents 215bebd + e249bef commit bc91e96
Show file tree
Hide file tree
Showing 739 changed files with 5,372 additions and 3,702 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/doc-build-pdf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
export PATH="build/bin:$PATH"
eval $(sage-print-system-package-command auto update)
eval $(sage-print-system-package-command auto --yes --no-install-recommends install zip)
eval $(sage-print-system-package-command auto --spkg --yes --no-install-recommends install git texlive)
eval $(sage-print-system-package-command auto --spkg --yes --no-install-recommends install git texlive texlive_luatex free_fonts xindy)
- name: Add prebuilt tree as a worktree
id: worktree
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/doc-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ jobs:
export PATH="build/bin:$PATH"
eval $(sage-print-system-package-command auto update)
eval $(sage-print-system-package-command auto --yes --no-install-recommends install zip)
eval $(sage-print-system-package-command auto --spkg --yes --no-install-recommends install git texlive)
eval $(sage-print-system-package-command auto --spkg --yes --no-install-recommends install git texlive texlive_luatex free_fonts xindy)
export SAGE_USE_CDNS=yes
export SAGE_LIVE_DOC=yes
export SAGE_JUPYTER_SERVER=binder:sagemath/sage-binder-env/dev
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.3.beta3
version: 10.3.beta4
doi: 10.5281/zenodo.593563
date-released: 2023-12-18
date-released: 2023-12-26
repository-code: "https://github.com/sagemath/sage"
url: "https://www.sagemath.org/"
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
SageMath version 10.3.beta3, Release Date: 2023-12-18
SageMath version 10.3.beta4, Release Date: 2023-12-26
2 changes: 1 addition & 1 deletion build/bin/sage-dist-helpers
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ sdh_pip_install() {
# Our default after #33789 (Sage 9.7): We allow the package to provision
# its build environment using the stored wheels.
# We pass --find-links.
# The SPKG needs to declare "setuptools_wheel" as a dependency.
# The SPKG needs to declare "setuptools" as a dependency.
build_isolation_option="--find-links=$SAGE_SPKG_WHEELS"
;;
--no-build-isolation)
Expand Down
2 changes: 1 addition & 1 deletion build/bin/sage-get-system-packages
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ case "$SYSTEM" in
fi
fi
SYSTEM_PACKAGES_FILE_NAMES="distros/$SYSTEM.txt"
STRIP_COMMENTS="sed s/#.*//;"
STRIP_COMMENTS="sed s/#.*//;s/\${PYTHON_MINOR}/${PYTHON_MINOR}/g"
COLLECT=echo
;;
esac
Expand Down
2 changes: 2 additions & 0 deletions build/bin/sage-guess-package-system
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ if conda --version > /dev/null 2>&1; then
fi
if brew --version > /dev/null 2>&1; then
echo homebrew
elif port version > /dev/null 2>&1; then
echo macports
elif emerge --version > /dev/null 2>&1; then
echo gentoo
elif apt-get --version > /dev/null 2>&1; then
Expand Down
63 changes: 46 additions & 17 deletions build/bin/sage-print-system-package-command
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@ do
;;
--prompt)
PROMPT=' $ '
CONTINUATION=' '
;;
--continuation=*)
CONTINUATION="${1#--continuation=}"
;;
--wrap)
WRAP=78
;;
--wrap=*)
WRAP="${1#--wrap=}"
;;
--no-install-recommends)
NO_INSTALL_RECOMMENDS=yes
Expand Down Expand Up @@ -79,7 +89,13 @@ function print_shell_command()
echo ".. CODE-BLOCK:: bash"
echo
fi
echo "${PROMPT}$1"
# shell-quote arguments if necessary
quoted=$(for a in "$@"; do printf "%q " $a; done)
if [ -z "$WRAP" -o $# -lt 6 ]; then
echo "${PROMPT}${quoted}"
else
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)))"
fi
if [ -n "$OUTPUT_RST" ]; then
echo
fi
Expand All @@ -102,77 +118,90 @@ case $system:$command in
[ -n "$SAGE_ROOT" ] || SAGE_ROOT=.
echo "${PROMPT}source $SAGE_ROOT/.homebrew-build-env"
;;
macports*:setup-build-env)
$IF_VERBOSE echo "${COMMENT}"
$IF_VERBOSE echo "${COMMENT}WARNING: Use of MacPorts is experimental"
$IF_VERBOSE echo "${COMMENT}"
$IF_VERBOSE echo "${COMMENT}MacPorts does not provide unversioned gfortran executables by default"
$IF_VERBOSE echo "${COMMENT}To make gfortran available (and build with gcc from XCode), use:"
$IF_VERBOSE echo "${COMMENT}"
$IF_VERBOSE print_shell_command ./configure FC=gfortran-mp-11
;;
*:setup-build-env)
# Nothing needed
;;
#
# Verbs handled above are our own inventions. Verbs handled below are apt-get verbs.
#
@(debian*|ubuntu*):update)
print_shell_command "${SUDO}apt-get $command $system_packages"
print_shell_command ${SUDO}apt-get $command $system_packages
;;
@(debian*|ubuntu*):*)
[ "$NO_INSTALL_RECOMMENDS" = yes ] && options="$options --no-install-recommends"
[ "$YES" = yes ] && options="$options --yes" env="DEBIAN_FRONTEND=noninteractive "
[ -n "$system_packages" ] && print_shell_command "${SUDO}${env}apt-get $command $options $system_packages"
[ -n "$system_packages" ] && print_shell_command ${SUDO}${env}apt-get $command $options $system_packages
;;
@(fedora*|redhat*|centos*):install)
[ "$YES" = yes ] && options="$options -y"
[ -n "$system_packages" ] && print_shell_command "${SUDO}yum install $options $system_packages"
[ -n "$system_packages" ] && print_shell_command ${SUDO}yum install $options $system_packages
;;
gentoo*:install)
[ -n "$system_packages" ] && print_shell_command "${SUDO}emerge $system_packages"
[ -n "$system_packages" ] && print_shell_command ${SUDO}emerge $system_packages
;;
arch*:update)
print_shell_command "${SUDO}pacman -Sy"
;;
arch*:install)
[ "$YES" = yes ] && options="$options --noconfirm"
[ -n "$system_packages" ] && print_shell_command "${SUDO}pacman -S $options $system_packages"
[ -n "$system_packages" ] && print_shell_command ${SUDO}pacman -S $options $system_packages
;;
void*:update)
print_shell_command "${SUDO}xbps-install -Su"
;;
void*:install)
[ "$YES" = yes ] && options="$options --yes"
[ -n "$system_packages" ] && print_shell_command "${SUDO}xbps-install $options $system_packages"
[ -n "$system_packages" ] && print_shell_command ${SUDO}xbps-install $options $system_packages
;;
opensuse*:install)
[ -n "$system_packages" ] && print_shell_command "${SUDO}zypper install $system_packages"
[ -n "$system_packages" ] && print_shell_command ${SUDO}zypper install $system_packages
;;
*conda*:install)
[ "$YES" = yes ] && options="$options --yes"
[ -n "$system_packages" ] && print_shell_command "conda install $options $system_packages"
[ -n "$system_packages" ] && print_shell_command conda install $options $system_packages
;;
homebrew*:install)
[ -n "$system_packages" ] && print_shell_command "brew install $system_packages"
[ -n "$system_packages" ] && print_shell_command brew install $system_packages
;;
macports*:install)
[ "$YES" = yes ] && options="$options -N"
[ -n "$system_packages" ] && print_shell_command ${SUDO}port $options install $system_packages
;;
slackware*:install)
[ -n "$system_packages" ] && print_shell_command "${SUDO}slackpkg install $system_packages"
[ -n "$system_packages" ] && print_shell_command ${SUDO}slackpkg install $system_packages
;;
cygwin*:update)
print_comment "first install apt-cyg from https://github.com/transcode-open/apt-cyg"
;;
cygwin*:install)
[ -n "$system_packages" ] && print_shell_command "apt-cyg install $system_packages"
[ -n "$system_packages" ] && print_shell_command apt-cyg install $system_packages
;;
freebsd*:install)
[ -n "$system_packages" ] && print_shell_command "${SUDO}pkg install $system_packages"
[ -n "$system_packages" ] && print_shell_command ${SUDO}pkg install $system_packages
;;
nix*:install)
[ -n "$system_packages" ] && print_shell_command "nix-env --install $system_packages"
[ -n "$system_packages" ] && print_shell_command nix-env --install $system_packages
;;
alpine:update)
print_shell_command "apk update"
;;
alpine:install)
[ -n "$system_packages" ] && print_shell_command "apk add $system_packages"
[ -n "$system_packages" ] && print_shell_command apk add $system_packages
;;
pip:install)
[ -n "$system_packages" ] && print_shell_command "sage -pip install $system_packages"
[ -n "$system_packages" ] && print_shell_command sage -pip install $system_packages
;;
cpan:install)
[ -n "$system_packages" ] && print_shell_command "cpan -i $system_packages"
[ -n "$system_packages" ] && print_shell_command cpan -i $system_packages
;;
repology:install)
if [ -n "$system_packages" ]; then
Expand Down
4 changes: 3 additions & 1 deletion build/bin/sage-spkg
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,9 @@ else
# just copy to dist/ and create a simple install script.
mkdir -p dist
cp "$PKG_SRC" dist/
echo "sdh_store_and_pip_install_wheel ." > spkg-install.in
if [ ! -f spkg-install.in ]; then
echo "sdh_store_and_pip_install_wheel ." > spkg-install.in
fi
;;
*)
# Source tarball
Expand Down
31 changes: 23 additions & 8 deletions build/bin/sage-spkg-info
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,26 @@
#
# Assumes SAGE_ROOT is set
PKG_BASE=$1
if [ -n "$OUTPUT_DIR" ]; then
exec > "$OUTPUT_DIR"/$PKG_BASE.rst
fi
if [ -n "$OUTPUT_RST" ]; then
echo ".. _spkg_$PKG_BASE:"
echo
ref () { echo ":ref:\`$1\`"; }
issue () { echo ":issue:\`$1\`"; }
code () { echo "\`\`$*\`\`"; }
else
ref () { echo "$1"; }
issue () { echo "https://github.com/sagemath/sage/issues/$1"; }
code () { echo "$1"; }
fi
PKG_SCRIPTS="$SAGE_ROOT/build/pkgs/$PKG_BASE"
for ext in rst txt; do
SPKG_FILE="$PKG_SCRIPTS/SPKG.$ext"
if [ -f "$SPKG_FILE" ]; then
sed "1,3s/^ *Sage: Open Source Mathematics Software:/$PKG_BASE:/" "$SPKG_FILE"
# for sphinx 4.4 we need to replace all direct links by some "extlink" (issue 33272)
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"
break
fi
done
Expand Down Expand Up @@ -39,9 +54,9 @@ for dep_file in dependencies dependencies_order_only; do
# Dependencies like $(BLAS)
\$\(*) echo "- $dep";;
# Looks like a package
*) if [ -n "$OUTPUT_RST" -a -r "$SAGE_ROOT/build/pkgs/$dep/SPKG.rst" ]; then
*) if [ -r "$SAGE_ROOT/build/pkgs/$dep/SPKG.rst" ]; then
# This RST label is set in src/doc/bootstrap
echo "- :ref:\`spkg_$dep\`"
echo "- $(ref spkg_$dep)"
else
echo "- $dep"
fi;;
Expand Down Expand Up @@ -103,7 +118,7 @@ for system in $systems; do
echo "$system:"
;;
esac
sage-print-system-package-command $system --prompt=' $ ' --sudo install $system_packages
sage-print-system-package-command $system --wrap --prompt=' $ ' --continuation=' ' --sudo install $system_packages
echo
done
if [ -z "$system" ]; then
Expand All @@ -114,15 +129,15 @@ else
if [ -f "${SPKG_CONFIGURE}" ]; then
if grep -q SAGE_PYTHON_PACKAGE_CHECK "${SPKG_CONFIGURE}"; then
echo "If the system package is installed and if the (experimental) option"
echo "--enable-system-site-packages is passed to ./configure, then ./configure"
echo "$(code --enable-system-site-packages) is passed to $(code ./configure), then $(code ./configure)"
echo "will check if the system package can be used."
else
echo "If the system package is installed, ./configure will check if it can be used."
echo "If the system package is installed, $(code ./configure) will check if it can be used."
fi
else
echo "However, these system packages will not be used for building Sage"
echo "because spkg-configure.m4 has not been written for this package;"
echo "see https://github.com/sagemath/sage/issues/27330"
echo "because $(code spkg-configure.m4) has not been written for this package;"
echo "see $(issue 27330)"
fi
fi
echo
13 changes: 8 additions & 5 deletions build/bin/write-dockerfile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,15 @@ export PATH="$SAGE_ROOT"/build/bin:$PATH
SYSTEM_PACKAGES=$EXTRA_SYSTEM_PACKAGES
CONFIGURE_ARGS="--enable-option-checking "
for SPKG in $(sage-package list --has-file=spkg-configure.m4 $SAGE_PACKAGE_LIST_ARGS) $EXTRA_SAGE_PACKAGES; do
SYSTEM_PACKAGE=$(sage-get-system-packages $SYSTEM $SPKG | sed 's/${PYTHON_MINOR}/'${PYTHON_MINOR}'/g')
SYSTEM_PACKAGE=$(sage-get-system-packages $SYSTEM $SPKG)
if [ -n "${SYSTEM_PACKAGE}" ]; then
# SYSTEM_PACKAGE can be empty if, for example, the environment
# variable ENABLE_SYSTEM_SITE_PACKAGES is empty.
SYSTEM_PACKAGES+=" ${SYSTEM_PACKAGE}"
CONFIGURE_ARGS+="--with-system-${SPKG}=${WITH_SYSTEM_SPKG} "
# SYSTEM_PACKAGE can be empty if, for example, the environment
# variable ENABLE_SYSTEM_SITE_PACKAGES is empty.
for a in $SYSTEM_PACKAGE; do
# shell-quote package if necessary
SYSTEM_PACKAGES+=$(printf " %q" "$a")
done
CONFIGURE_ARGS+="--with-system-${SPKG}=${WITH_SYSTEM_SPKG} "
fi
done
echo "# Automatically generated by SAGE_ROOT/build/bin/write-dockerfile.sh"
Expand Down
2 changes: 1 addition & 1 deletion build/make/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ all-toolchain: base-toolchain

# Shorthand for a list of packages sufficient for building and installing
# typical Python packages from source. Wheel packages only need pip.
PYTHON_TOOLCHAIN = setuptools pip setuptools_scm wheel setuptools_wheel
PYTHON_TOOLCHAIN = setuptools pip setuptools_scm wheel flit_core hatchling

# Trac #32056: Avoid installed setuptools leaking into the build of python3 by uninstalling it.
# It will have to be reinstalled anyway because of its dependency on $(PYTHON).
Expand Down
4 changes: 3 additions & 1 deletion build/pkgs/_bootstrap/distros/arch.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Packages needed for ./bootstrap
autoconf automake libtool
autoconf
automake
libtool
pkgconf
4 changes: 3 additions & 1 deletion build/pkgs/_bootstrap/distros/cygwin.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# Packages needed for ./bootstrap
autoconf automake libtool
autoconf
automake
libtool
5 changes: 3 additions & 2 deletions build/pkgs/_bootstrap/distros/fedora.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Packages needed for ./bootstrap
autoconf automake libtool
# Fedora 26 needs:
autoconf
automake
libtool
pkg-config
5 changes: 4 additions & 1 deletion build/pkgs/_bootstrap/distros/freebsd.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# Packages needed for ./bootstrap
autoconf automake libtool pkg-config
autoconf
automake
libtool
pkg-config
5 changes: 4 additions & 1 deletion build/pkgs/_bootstrap/distros/homebrew.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# Packages needed for ./bootstrap
autoconf automake libtool pkg-config
autoconf
automake
libtool
pkg-config
6 changes: 6 additions & 0 deletions build/pkgs/_bootstrap/distros/macports.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Packages needed for ./bootstrap
gettext
autoconf
automake
libtool
pkgconfig
5 changes: 4 additions & 1 deletion build/pkgs/_bootstrap/distros/nix.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# Packages needed for ./bootstrap
autoconf automake libtool pkg-config
autoconf
automake
libtool
pkg-config
7 changes: 5 additions & 2 deletions build/pkgs/_bootstrap/distros/void.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Packages needed for ./bootstrap
autoconf automake libtool
xtools mk-configure
autoconf
automake
libtool
xtools
mk-configure
pkg-config
9 changes: 9 additions & 0 deletions build/pkgs/_prereq/distros/alpine.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# This file, build/pkgs/_prereq/distros/alpine.txt, contains names of
# Alpine Linux packages needed for installation of Sage from source.
#
# In addition, the files build/pkgs/SPKG/distros/alpine.txt contain
# the names of packages that provide the equivalent of SPKG.
#
# One package per line. No need to escape special characters.
# Everything on a line after a # character is ignored.
#
binutils
make
m4
Expand Down
9 changes: 9 additions & 0 deletions build/pkgs/_prereq/distros/arch.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# This file, build/pkgs/_prereq/distros/arch.txt, contains names of
# Arch Linux packages needed for installation of Sage from source.
#
# In addition, the files build/pkgs/SPKG/distros/arch.txt contain
# the names of packages that provide the equivalent of SPKG.
#
# One package per line. No need to escape special characters.
# Everything on a line after a # character is ignored.
#
binutils
make
m4
Expand Down
Loading

0 comments on commit bc91e96

Please sign in to comment.