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.beta14' into t/30657/fix_up__sage__p_
Browse files Browse the repository at this point in the history
SageMath version 9.2.beta14, Release Date: 2020-09-30
  • Loading branch information
Matthias Koeppe committed Oct 2, 2020
2 parents 2e20f23 + 1da6df4 commit be2417c
Show file tree
Hide file tree
Showing 281 changed files with 3,537 additions and 9,999 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
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.beta14, Release Date: 2020-09-30
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
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
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
2 changes: 1 addition & 1 deletion build/make/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ INST = $(SAGE_SPKG_INST)

# Aliases for mutually exclusive standard packages selected at configure time
TOOLCHAIN = @SAGE_TOOLCHAIN@
PYTHON = python@SAGE_PYTHON_VERSION@
PYTHON = python3
MP_LIBRARY = @SAGE_MP_LIBRARY@
BLAS = @SAGE_BLAS@

Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/conda-bootstrap.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Packages needed for ./bootstrap
gettext autoconf automake libtool pkg-config
gettext autoconf automake libtool
3 changes: 2 additions & 1 deletion build/pkgs/conda.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ compilers
make
m4
perl
"python<3.8"
"python<3.9"
tar
bc
pkg-config
6 changes: 3 additions & 3 deletions build/pkgs/configure/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
tarball=configure-VERSION.tar.gz
sha1=e8cac32102815b6ff83bbb455c5d4cacc5b4ee8f
md5=caa431f870eb76bf36b0bfd47a01ba5d
cksum=2384868099
sha1=2d1d5ab6f12d7181f246eacec7b2fb1e1338b9ed
md5=4c9d6a5ed4f1b2494187fe043a15214b
cksum=3219488233
2 changes: 1 addition & 1 deletion build/pkgs/configure/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
85a3dc5389b6670934938f705a9366b4ba8573b8
be1a62b3bc99666c909f3672a8bf7baf32a15404
5 changes: 0 additions & 5 deletions build/pkgs/cryptominisat/spkg-install.in
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
cd src

if [ $SAGE_PYTHON_VERSION -eq 2 ]
then
EXTRA_OPTS="-DFORCE_PYTHON2='ON'"
fi

sdh_cmake -DUSE_GAUSS='ON' $EXTRA_OPTS
sdh_make VERBOSE=ON
sdh_make_install VERBOSE=ON
4 changes: 0 additions & 4 deletions build/pkgs/gap_packages/checksums.ini

This file was deleted.

1 change: 1 addition & 0 deletions build/pkgs/gap_packages/checksums.ini
1 change: 0 additions & 1 deletion build/pkgs/gap_packages/package-version.txt

This file was deleted.

1 change: 1 addition & 0 deletions build/pkgs/gap_packages/package-version.txt
3 changes: 1 addition & 2 deletions build/pkgs/gc/distros/conda.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
# needs rectificatation from conda people
# libgc
bdw-gc
7 changes: 4 additions & 3 deletions build/pkgs/gmpy2/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
tarball=gmpy2-VERSION.tar.gz
sha1=b78f6e6d06d6406f7896e71ff7dca4c43c7368f1
md5=500cbece0fedbd13598b1ddc52c893c7
cksum=3080201027
sha1=ef3cfb93ce0ea8b5ad4cebef5bf3c55d8fb5821a
md5=1504652fcab1cd8ce3e42661d42f9f73
cksum=3152134051
upstream_url=https://pypi.io/packages/source/g/gmpy2/gmpy2-VERSION.tar.gz
2 changes: 1 addition & 1 deletion build/pkgs/gmpy2/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.1.0b1
2.1.0b5
3 changes: 1 addition & 2 deletions build/pkgs/libatomic_ops/distros/conda.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
# this needs a rectification from Conda people
# libatomic_ops
libatomic_ops
4 changes: 1 addition & 3 deletions build/pkgs/nose/spkg-check.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
cd src

if SAGE_PYTHON3=yes; then
python3 setup.py build_tests
fi
python3 setup.py build_tests

sage-python23 selftest.py
Loading

0 comments on commit be2417c

Please sign in to comment.