Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Merge tag '9.2.rc2' into t/30578/add-src-requirements-txt
Browse files Browse the repository at this point in the history
SageMath version 9.2.rc2, Release Date: 2020-10-12
  • Loading branch information
mkoeppe committed Oct 16, 2020
2 parents 4e3a2c3 + 1e728ac commit 659f723
Show file tree
Hide file tree
Showing 340 changed files with 6,144 additions and 10,647 deletions.
2 changes: 1 addition & 1 deletion .ci/build-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ docker_build() {
# Docker's --cache-from does not really work with multi-stage builds: https://github.com/moby/moby/issues/34715
# So we just have to rely on the local cache.
time docker build -f docker/Dockerfile \
--build-arg "WITH_PYTHON=${WITH_PYTHON}" --build-arg "MAKEFLAGS=${MAKEFLAGS}" --build-arg "SAGE_NUM_THREADS=${SAGE_NUM_THREADS}" --build-arg "MAKEFLAGS_DOCBUILD=${MAKEFLAGS}" --build-arg "SAGE_NUM_THREADS_DOCBUILD=${SAGE_NUM_THREADS_DOCBUILD}" --build-arg ARTIFACT_BASE=$ARTIFACT_BASE $@
--build-arg "--build-arg "MAKEFLAGS=${MAKEFLAGS}" --build-arg "SAGE_NUM_THREADS=${SAGE_NUM_THREADS}" --build-arg "MAKEFLAGS_DOCBUILD=${MAKEFLAGS}" --build-arg "SAGE_NUM_THREADS_DOCBUILD=${SAGE_NUM_THREADS_DOCBUILD}" --build-arg ARTIFACT_BASE=$ARTIFACT_BASE $@
}
# We use a multi-stage build /docker/Dockerfile. For the caching to be
Expand Down
4 changes: 2 additions & 2 deletions .homebrew-build-env
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# that activate keg-only homebrew package installations

HOMEBREW=`brew --prefix` || return 1
for l in gettext; do
for l in gettext bzip2; do
if [ -d "$HOMEBREW/opt/$l/bin" ]; then
PATH="$HOMEBREW/opt/$l/bin:$PATH"
fi
Expand All @@ -23,7 +23,7 @@ export PKG_CONFIG_PATH
LIBRARY_PATH="$HOMEBREW/lib$LIBRARY_PATH"
[ -z "$CPATH" ] || CPATH=":${CPATH}"
CPATH="$HOMEBREW/include$CPATH"
for l in readline ; do
for l in readline bzip2; do
if [ -d "$HOMEBREW/opt/$l/lib" ]; then
LIBRARY_PATH="$HOMEBREW/opt/$l/lib:$LIBRARY_PATH"
fi
Expand Down
27 changes: 27 additions & 0 deletions .zenodo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"description": "Mirror of the Sage https://sagemath.org/ source tree",
"license": "other-open",
"title": "sagemath/sage: 9.2.rc2",
"version": "9.2.rc2",
"upload_type": "software",
"publication_date": "2020-10-12",
"creators": [
{
"affiliation": "SageMath.org",
"name": "The SageMath Developers"
}
],
"access_right": "open",
"related_identifiers": [
{
"scheme": "url",
"identifier": "https://github.com/sagemath/sage/tree/9.2.rc2",
"relation": "isSupplementTo"
},
{
"scheme": "doi",
"identifier": "10.5281/zenodo.593563",
"relation": "isVersionOf"
}
]
}
27 changes: 27 additions & 0 deletions .zenodo.json.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"description": "Mirror of the Sage https://sagemath.org/ source tree",
"license": "other-open",
"title": "sagemath/sage: ${SAGE_VERSION}",
"version": "${SAGE_VERSION}",
"upload_type": "software",
"publication_date": "${SAGE_RELEASE_DATE}",
"creators": [
{
"affiliation": "SageMath.org",
"name": "The SageMath Developers"
}
],
"access_right": "open",
"related_identifiers": [
{
"scheme": "url",
"identifier": "https://github.com/sagemath/sage/tree/${SAGE_VERSION}",
"relation": "isSupplementTo"
},
{
"scheme": "doi",
"identifier": "10.5281/zenodo.593563",
"relation": "isVersionOf"
}
]
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ Guide](https://doc.sagemath.org/html/en/installation).
``ExtUtils::MakeMaker``), `ranlib`, `git`, `tar`, `bc`

* Any version of `python` (full installation including `urllib`),
but ideally version 3.7.x, which will avoid having to build Sage's
but ideally version 3.7.x or 3.8.x, which will avoid having to build Sage's
own copy of Python 3.

We have collected lists of system packages that provide these build
Expand Down
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
SageMath version 9.2.beta13, Release Date: 2020-09-21
SageMath version 9.2.rc2, Release Date: 2020-10-12
100 changes: 78 additions & 22 deletions bootstrap
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/sh

########################################################################
# Regenerate auto-generated files (e.g. configure)
Expand All @@ -17,6 +17,9 @@
# will download http://host/path/configure-$CONFVERSION.tar.gz to
# upstream/configure-$CONFVERSION.tar.gz. This is used by the buildbot
# to download tarballs that are not published.
#
# The -q (quiet) flag hides all "informational" output.
#
########################################################################

# Set SAGE_ROOT to the path to this file and then cd into it
Expand Down Expand Up @@ -66,7 +69,9 @@ install_config_rpath() {
return 179
fi

echo "bootstrap:$LINENO: installing 'config/config.rpath'"
if [ "${BOOTSTRAP_QUIET}" = "no" ]; then
echo "bootstrap:$LINENO: installing 'config/config.rpath'"
fi
cp "$config_rpath" config/
}

Expand Down Expand Up @@ -97,10 +102,24 @@ SAGE_SPKG_CONFIGURE_$(echo ${pkgname} | tr '[a-z]' '[A-Z]')"
done
echo "$spkg_configures" >> m4/sage_spkg_configures.m4

SAGE_ROOT="$SAGE_ROOT" src/doc/bootstrap && \
# Default to no filter if "-q" was not passed.
QUIET_SED_FILTER=""
if [ "${BOOTSTRAP_QUIET}" = "yes" ]; then
# Otherwise, this filters the expected output from automake.
QUIET_SED_FILTER='/configure\.ac:[0-9][0-9]*: installing /d'
fi

# The insanity with automake's descriptors is intended to filter
# ONLY stderr, and to re-output the results back to stderr leaving
# stdout alone. Basically we swap the two descriptors using a
# third, filter, and then swap them back.
BOOTSTRAP_QUIET="${BOOTSTRAP_QUIET}" \
SAGE_ROOT="$SAGE_ROOT" \
src/doc/bootstrap && \
install_config_rpath && \
aclocal -I m4 && \
automake --add-missing --copy build/make/Makefile-auto && \
automake --add-missing --copy build/make/Makefile-auto 3>&1 1>&2 2>&3 \
| sed "${QUIET_SED_FILTER}" 3>&1 1>&2 2>&3 && \
autoconf

st=$?
Expand All @@ -110,7 +129,7 @@ SAGE_SPKG_CONFIGURE_$(echo ${pkgname} | tr '[a-z]' '[A-Z]')"
179|16|63|127) # install_config_rpath failed|no m4 for pkg-config|autotools not installed|or version too old
if [ $DOWNLOAD = yes ]; then
echo >&2 "Bootstrap failed, downloading required files instead."
bootstrap-download || exit $?
bootstrap_download || exit $?
else
if [ $st -eq 127 ]; then
verb="install"
Expand All @@ -129,8 +148,11 @@ SAGE_SPKG_CONFIGURE_$(echo ${pkgname} | tr '[a-z]' '[A-Z]')"
}

# Bootstrap by downloading the auto-generated files
bootstrap-download () {
sage-download-file configure-$CONFVERSION.tar.gz
bootstrap_download () {
SAGE_DL_LOGLEVEL=""
[ "${BOOTSTRAP_QUIET}" = "yes" ] && SAGE_DL_LOGLEVEL="--log=WARNING"
sage-download-file ${SAGE_DL_LOGLEVEL} configure-$CONFVERSION.tar.gz

if [ $? -ne 0 ]; then
echo >&2 "Error: downloading configure-$CONFVERSION.tar.gz failed"
exit 1
Expand All @@ -156,22 +178,46 @@ save () {

NEWCONFVERSION=`git rev-parse HEAD`
NEWCONFBALL="upstream/configure-$NEWCONFVERSION.tar.gz"

# Create configure tarball
echo "Creating $NEWCONFBALL..."
if [ "${BOOTSTRAP_QUIET}" = "no" ]; then
echo "Creating $NEWCONFBALL..."
fi
mkdir -p upstream
tar zcf "$NEWCONFBALL" configure config/* build/make/Makefile-auto.in src/doc/en/installation/*.txt src/doc/en/reference/spkg/*.rst src/doc/en/reference/repl/*.txt

tar zcf "$NEWCONFBALL" \
configure \
config/* \
build/make/Makefile-auto.in \
src/doc/en/installation/*.txt \
src/doc/en/reference/spkg/*.rst \
src/doc/en/reference/repl/*.txt

# Update version
echo "$NEWCONFVERSION" >$PKG/package-version.txt

# Compute checksum
./sage --package fix-checksum configure
if [ "${BOOTSTRAP_QUIET}" = "no" ]; then
./sage --package fix-checksum configure
else
# Hide the "Updating checksum..." message
./sage --package fix-checksum configure > /dev/null
fi
}


usage () {
echo >&2 "Usage: $0 [-d|-D|-s] [-u <URL>] [-h]"
echo >&2 "Usage: $0 [-d|-D|-s] [-u <URL>] [-h] [-q]"
echo >&2 ""
echo >&2 "Options:"
echo >&2 " -d fall back to downloading (released versions only)"
echo >&2 " or using a pre-generated configure script"
echo >&2 " -D download and use a pre-generated configure script"
echo >&2 " (released versions only); overrides -d"
echo >&2 " -s save the generated configure script under upstream/"
echo >&2 " for later use with -d or -D"
echo >&2 " -u <URL> like -D, but downloads from the specified base URL"
echo >&2 " -h display this help and exit"
echo >&2 " -q hide informational output (be quiet)"
}


Expand All @@ -180,14 +226,16 @@ SAVE=no
DOWNLOAD=no
ALWAYSDOWNLOAD=no
CONFTARBALL_URL=""
while getopts "Ddshu:" OPTION
BOOTSTRAP_QUIET=no
while getopts "Ddsu:hq" OPTION
do
case "$OPTION" in
D) ALWAYSDOWNLOAD=yes; DOWNLOAD=yes;;
d) DOWNLOAD=yes;;
s) SAVE=yes;;
u) CONFTARBALL_URL="$OPTARG"; ALWAYSDOWNLOAD=yes; DOWNLOAD=yes;;
h) usage; exit 0;;
q) BOOTSTRAP_QUIET=yes;;
?) usage; exit 2;;
esac
done
Expand All @@ -200,26 +248,34 @@ if [ $DOWNLOAD$SAVE = yesyes ]; then
fi

# Start cleanly (it's not a problem if this fails)
$MAKE bootstrap-clean 2>/dev/null
# POSIX supports two separate incompatible formats for the MAKEFLAGS
# variable, so instead of guessing, we simply define our own variable
# to optionally pass an "-s" (silent) flag to Make.
MAKE_SILENT=""
[ "${BOOTSTRAP_QUIET}" = "yes" ] && MAKE_SILENT="-s"
$MAKE ${MAKE_SILENT} bootstrap-clean 2>/dev/null
mkdir config 2>/dev/null

# If Sage has not been built yet, this will fail due to a missing
# sage-env-config. We just ignore that error.
source src/bin/sage-env-config 2>/dev/null
source src/bin/sage-env 2>/dev/null

# sage-env-config.
if [ -f src/bin/sage-env-config ]; then
. src/bin/sage-env-config
. src/bin/sage-env
fi

if [ $ALWAYSDOWNLOAD = yes ]; then
if [ -n "$CONFTARBALL_URL" ]; then
URL="$CONFTARBALL_URL"/configure-$CONFVERSION.tar.gz
sage-download-file "$URL" upstream/configure-$CONFVERSION.tar.gz
SAGE_DL_LOGLEVEL=""
[ "${BOOTSTRAP_QUIET}" = "yes" ] && SAGE_DL_LOGLEVEL="--log=WARNING"
sage-download-file ${SAGE_DL_LOGLEVEL} "$URL" upstream/configure-$CONFVERSION.tar.gz
if [ $? -ne 0 ]; then
echo >&2 "Error: downloading configure-$CONFVERSION.tar.gz from $CONFTARBALL_URL failed"
exit 1
fi
echo >&2 "Downloaded configure-$CONFVERSION.tar.gz from $CONFTARBALL_URL "
else
bootstrap-download || exit $?
bootstrap_download || exit $?
fi
else
bootstrap
Expand Down
15 changes: 12 additions & 3 deletions build/bin/sage-get-system-packages
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh
SYSTEM=$1
if [ -z "$SYSTEM" ]; then
echo >&2 "usage: $0 {debian|arch|conda|...} SPKGS..."
echo >&2 "usage: $0 {debian|arch|conda|pip|...} SPKGS..."
exit 1
fi
shift
Expand All @@ -10,9 +10,18 @@ SPKGS="$*"
if [ -z "$SAGE_ROOT" ]; then
SAGE_ROOT=`pwd`
fi
STRIP_COMMENTS="sed s/#.*//;"
case "$SYSTEM" in
pip)
SYSTEM_PACKAGES_FILE_NAME="requirements.txt"
STRIP_COMMENTS='sed s/#.*//;s/[[:space:]]//g;'
;;
*)
SYSTEM_PACKAGES_FILE_NAME="distros/$SYSTEM.txt"
STRIP_COMMENTS="sed s/#.*//;"
;;
esac
for PKG_BASE in $SPKGS; do
SYSTEM_PACKAGES_FILE=$SAGE_ROOT/build/pkgs/$PKG_BASE/distros/$SYSTEM.txt
SYSTEM_PACKAGES_FILE="$SAGE_ROOT"/build/pkgs/$PKG_BASE/$SYSTEM_PACKAGES_FILE_NAME
if [ -f $SYSTEM_PACKAGES_FILE ]; then
echo $(${STRIP_COMMENTS} $SYSTEM_PACKAGES_FILE)
fi
Expand Down
8 changes: 7 additions & 1 deletion build/bin/sage-print-system-package-command
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,14 @@ do
# Whether to print sudo for package managers that need sudo for non-root users
SUDO="sudo "
;;
--prompt=*)
PROMPT=${1#--prompt=}
;;
--prompt)
PROMPT=' $ '
;;
-*)
echo >&2 "$0: unknown option $2"
echo >&2 "$0: unknown option $1"
exit 1
;;
*)
Expand Down Expand Up @@ -86,6 +89,9 @@ case $system:$command in
freebsd*:install)
[ -n "$system_packages" ] && echo "${PROMPT}${SUDO}pkg install $system_packages"
;;
pip:install)
[ -n "$system_packages" ] && echo "${PROMPT}sage -pip install $system_packages"
;;
*:update)
# Nothing needed
;;
Expand Down
6 changes: 1 addition & 5 deletions build/bin/sage-python23
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@
# using for installing Python packages if at all possible.


if [ "$SAGE_PYTHON3" = yes ]; then
PYTHON="$SAGE_LOCAL/bin/python3"
else
PYTHON="$SAGE_LOCAL/bin/python2"
fi
PYTHON="$SAGE_LOCAL/bin/python3"

# Check that Python is actually installed and issue an error message if not--in
# particular if this was run from an spkg-install before Python is installed
Expand Down
10 changes: 9 additions & 1 deletion build/bin/sage-site
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,15 @@ if [ "$1" = "-docbuild" -o "$1" = "--docbuild" ]; then
# tends to ask interactive questions if something goes wrong. These
# cause the build to hang. If stdin is /dev/null, TeX just aborts.
shift
export LANG=C # to ensure it is possible to scrape out non-EN locale warnings

# Trac #30002: ensure an English locale so that it is possible to
# scrape out warnings by pattern matching.
# Trac #30576: But we have to avoid the C locale, which disables
# proper UTF-8 operation in Python 3.6 or older.
LC_ALL=$(locale -a | grep -E -i '^(c|en_us)[-.]utf-?8$' | head -n 1)
LANG=$LC_ALL
export LC_ALL
export LANG

# See #30351: bugs in macOS implementations of openblas/libgopm can cause
# docbuild to hang if multiple OpenMP threads are allowed.
Expand Down
3 changes: 3 additions & 0 deletions build/bin/sage-spkg
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,9 @@ if [ -z "$SAGE_BUILD_DIR" ]; then
export SAGE_BUILD_DIR="$SAGE_LOCAL/var/tmp/sage/build"
fi

export SAGE_SPKG_INST="$SAGE_LOCAL/var/lib/sage/installed"
export SAGE_SPKG_SCRIPTS="$SAGE_LOCAL/var/lib/sage/scripts"
export SAGE_SPKG_WHEELS="$SAGE_LOCAL/var/lib/sage/wheels"

# Remove '.' from PYTHONPATH, to avoid trouble with setuptools / easy_install
# (cf. #10192, #10176):
Expand Down
10 changes: 10 additions & 0 deletions build/bin/sage-system-python
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,16 @@ fi
# is accessible by this python; this is to guard on Cygwin against Pythons
# installed somewhere else in Windows.

# Trac #30008: Make it work even if the environment tries to sabotage UTF-8
# operation in Python 3.0.x-3.6.x by setting LC_ALL=C or similar.

if [ "$LC_ALL" = "C" -o "$LANG" = "C" -o "$LC_CTYPE" = "C" ]; then
LC_ALL=$(locale -a | grep -E -i '^(c|en_us)[-.]utf-?8$' | head -n 1)
LANG=$LC_ALL
export LC_ALL
export LANG
fi

PYTHONS="python python3 python3.8 python3.7 python2.7 python3.6 python2"
for PY in $PYTHONS; do
PYTHON="$(PATH="$SAGE_ORIG_PATH" command -v $PY)"
Expand Down
Loading

0 comments on commit 659f723

Please sign in to comment.