Skip to content

Commit 2a4a323

Browse files
author
Matthias Koeppe
committed
Merge tag '9.5.beta7' into t/29039/pip_installable_package_sage_bootstrap
SageMath version 9.5.beta7, Release Date: 2021-11-18
2 parents 0026892 + cc60cfe commit 2a4a323

File tree

583 files changed

+9788
-6310
lines changed

Some content is hidden

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

583 files changed

+9788
-6310
lines changed

.github/workflows/tox-experimental.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
# This list is different from the one in tox.yml:
4242
# Trac #31526 switches gcc 4.x-based distributions to using the gcc_spkg configuration factor
4343
# Trac #32281 removes gcc 4.x-based distributions whose binutils are unusable
44-
tox_system_factor: [ubuntu-xenial, ubuntu-bionic, ubuntu-focal, ubuntu-groovy, ubuntu-hirsute, debian-jessie-gcc_spkg, debian-stretch, debian-buster, debian-bullseye, debian-sid, linuxmint-18, linuxmint-19, linuxmint-19.3, linuxmint-20.1, fedora-26, fedora-27, fedora-28, fedora-29, fedora-30, fedora-31, fedora-32, fedora-33, fedora-34, centos-7-gcc_spkg, centos-8, gentoo, archlinux-latest, opensuse-15, opensuse-15.3, opensuse-tumbleweed, slackware-14.2, conda-forge, ubuntu-bionic-i386, manylinux-2_24-i686, debian-buster-i386, centos-7-i386-gcc_spkg]
44+
tox_system_factor: [ubuntu-xenial, ubuntu-bionic, ubuntu-focal, ubuntu-groovy, ubuntu-hirsute, debian-jessie-gcc_spkg, debian-stretch, debian-buster, debian-bullseye, debian-sid, linuxmint-18, linuxmint-19, linuxmint-19.3, linuxmint-20.1, fedora-26, fedora-27, fedora-28, fedora-29, fedora-30, fedora-31, fedora-32, fedora-33, fedora-34, centos-7-gcc_spkg, centos-8, gentoo-python3.9, gentoo-python3.10, archlinux-latest, opensuse-15, opensuse-15.3, opensuse-tumbleweed, slackware-14.2, conda-forge, ubuntu-bionic-i386, manylinux-2_24-i686, debian-buster-i386, centos-7-i386-gcc_spkg]
4545
tox_packages_factor: [maximal]
4646
targets_pattern: [0-g, h-o, p, q-z]
4747
env:

.github/workflows/tox-optional.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
# This list is different from the one in tox.yml:
4242
# Trac #31526 switches gcc 4.x-based distributions to using the gcc_spkg configuration factor
4343
# Trac #32281 removes gcc 4.x-based distributions whose binutils are unusable
44-
tox_system_factor: [ubuntu-xenial, ubuntu-bionic, ubuntu-focal, ubuntu-groovy, ubuntu-hirsute, debian-jessie-gcc_spkg, debian-stretch, debian-buster, debian-bullseye, debian-sid, linuxmint-18, linuxmint-19, linuxmint-19.3, linuxmint-20.1, fedora-26, fedora-27, fedora-28, fedora-29, fedora-30, fedora-31, fedora-32, fedora-33, fedora-34, centos-7-gcc_spkg, centos-8, gentoo, archlinux-latest, opensuse-15, opensuse-15.3, opensuse-tumbleweed, slackware-14.2, conda-forge, ubuntu-bionic-i386, manylinux-2_24-i686, debian-buster-i386, centos-7-i386-gcc_spkg]
44+
tox_system_factor: [ubuntu-xenial, ubuntu-bionic, ubuntu-focal, ubuntu-groovy, ubuntu-hirsute, debian-jessie-gcc_spkg, debian-stretch, debian-buster, debian-bullseye, debian-sid, linuxmint-18, linuxmint-19, linuxmint-19.3, linuxmint-20.1, fedora-26, fedora-27, fedora-28, fedora-29, fedora-30, fedora-31, fedora-32, fedora-33, fedora-34, centos-7-gcc_spkg, centos-8, gentoo-python3.9, gentoo-python3.10, archlinux-latest, opensuse-15, opensuse-15.3, opensuse-tumbleweed, slackware-14.2, conda-forge, ubuntu-bionic-i386, manylinux-2_24-i686, debian-buster-i386, centos-7-i386-gcc_spkg]
4545
tox_packages_factor: [maximal]
4646
targets_pattern: [0-g, h-o, p, q-z]
4747
env:

.github/workflows/tox.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
fail-fast: false
3939
max-parallel: 20
4040
matrix:
41-
tox_system_factor: [ubuntu-trusty, ubuntu-xenial, ubuntu-bionic, ubuntu-focal, ubuntu-groovy, ubuntu-hirsute, ubuntu-impish, debian-jessie, debian-stretch, debian-buster, debian-bullseye, debian-sid, linuxmint-17, linuxmint-18, linuxmint-19, linuxmint-19.3, linuxmint-20.1, linuxmint-20.2, fedora-26, fedora-27, fedora-28, fedora-29, fedora-30, fedora-31, fedora-32, fedora-33, fedora-34, fedora-35, centos-7, centos-8, gentoo, gentoo-python3.7, archlinux-latest, opensuse-15, opensuse-15.3, opensuse-tumbleweed, slackware-14.2, conda-forge, ubuntu-bionic-i386, manylinux-2_24-i686, debian-buster-i386, centos-7-i386]
41+
tox_system_factor: [ubuntu-trusty, ubuntu-xenial, ubuntu-bionic, ubuntu-focal, ubuntu-groovy, ubuntu-hirsute, ubuntu-impish, debian-jessie, debian-stretch, debian-buster, debian-bullseye, debian-sid, linuxmint-17, linuxmint-18, linuxmint-19, linuxmint-19.3, linuxmint-20.1, linuxmint-20.2, fedora-26, fedora-27, fedora-28, fedora-29, fedora-30, fedora-31, fedora-32, fedora-33, fedora-34, fedora-35, centos-7, centos-8, gentoo-python3.9, gentoo-python3.10, archlinux-latest, opensuse-15, opensuse-15.3, opensuse-tumbleweed, slackware-14.2, conda-forge, ubuntu-bionic-i386, manylinux-2_24-i686, debian-buster-i386, centos-7-i386]
4242
tox_packages_factor: [minimal, standard]
4343
env:
4444
TOX_ENV: docker-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }}

.homebrew-build-env

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# that activate keg-only homebrew package installations
33

44
HOMEBREW=`brew --prefix` || return 1
5-
for l in gettext bzip2 texinfo; do
5+
for l in gettext bzip2 texinfo polymake; do
66
if [ -d "$HOMEBREW/opt/$l/bin" ]; then
77
PATH="$HOMEBREW/opt/$l/bin:$PATH"
88
fi
@@ -23,7 +23,7 @@ export PKG_CONFIG_PATH
2323
LIBRARY_PATH="$HOMEBREW/lib$LIBRARY_PATH"
2424
[ -z "$CPATH" ] || CPATH=":${CPATH}"
2525
CPATH="$HOMEBREW/include$CPATH"
26-
for l in readline bzip2 ntl; do
26+
for l in readline bzip2 ntl polymake; do
2727
if [ -d "$HOMEBREW/opt/$l/lib" ]; then
2828
LIBRARY_PATH="$HOMEBREW/opt/$l/lib:$LIBRARY_PATH"
2929
fi

.zenodo.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"description": "Mirror of the Sage https://sagemath.org/ source tree",
33
"license": "other-open",
4-
"title": "sagemath/sage: 9.5.beta5",
5-
"version": "9.5.beta5",
4+
"title": "sagemath/sage: 9.5.beta7",
5+
"version": "9.5.beta7",
66
"upload_type": "software",
7-
"publication_date": "2021-10-28",
7+
"publication_date": "2021-11-18",
88
"creators": [
99
{
1010
"affiliation": "SageMath.org",
@@ -15,7 +15,7 @@
1515
"related_identifiers": [
1616
{
1717
"scheme": "url",
18-
"identifier": "https://github.com/sagemath/sage/tree/9.5.beta5",
18+
"identifier": "https://github.com/sagemath/sage/tree/9.5.beta7",
1919
"relation": "isSupplementTo"
2020
},
2121
{

VERSION.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
SageMath version 9.5.beta5, Release Date: 2021-10-28
1+
SageMath version 9.5.beta7, Release Date: 2021-11-18

build/bin/sage-bootstrap-python

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,19 @@ if [ "$LC_ALL" = "C" -o "$LANG" = "C" -o "$LC_CTYPE" = "C" ]; then
4040
export LANG
4141
fi
4242

43-
PYTHONS="python python3 python3.8 python3.7 python2.7 python3.6 python2"
43+
PYTHONS="python python3 python3.10 python3.9 python3.8 python3.7 python2.7 python3.6 python2"
44+
# Trac #32405: Prefer a Python that provides ssl with SNI, which allows developers
45+
# to download from upstream URLs (configure --enable-download-from-upstream-url),
46+
# in particular from PyPI, which requires SNI.
47+
for PY in $PYTHONS; do
48+
PYTHON="$(PATH="$SAGE_ORIG_PATH" command -v $PY)"
49+
if [ -n "$PYTHON" ]; then
50+
if "$PYTHON" -c "import argparse; import urllib; from hashlib import sha1; from ssl import HAS_SNI; assert HAS_SNI; from os import listdir; listdir(\"$(pwd)\");" 2>/dev/null; then
51+
exec "$PYTHON" "$@"
52+
fi
53+
fi
54+
done
55+
# Second round, no ssl/SNI test.
4456
for PY in $PYTHONS; do
4557
PYTHON="$(PATH="$SAGE_ORIG_PATH" command -v $PY)"
4658
if [ -n "$PYTHON" ]; then

build/bin/sage-dist-helpers

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,12 @@
5656
# be given as arguments. If $SAGE_DESTDIR is not set then the command is
5757
# run with $SAGE_SUDO, if set.
5858
#
59-
# - sdh_pip_install [...]
59+
# - sdh_pip_install [--no-deps] [--build-isolation] [...]
6060
#
61-
# Runs `pip install` with the given arguments, as well as additional
62-
# default arguments used for installing packages into Sage with pip.
63-
# Currently this is just a wrapper around the `sage-pip-install` command.
61+
# Builds a wheel using `pip wheel` with the given options [...], then installs
62+
# the wheel. Unless the special option --build-isolation is given,
63+
# the wheel is built using the option --no-build-isolation.
64+
# If the special option --no-deps is given, it is passed to pip install.
6465
# If $SAGE_DESTDIR is not set then the command is run with $SAGE_SUDO, if
6566
# set.
6667
#
@@ -240,10 +241,37 @@ sdh_pip_install() {
240241
echo "Installing $PKG_NAME"
241242
mkdir -p dist
242243
rm -f dist/*.whl
243-
python3 -m pip wheel --use-feature=in-tree-build --wheel-dir=dist --no-binary :all: --verbose --no-deps --no-index --isolated --no-build-isolation --ignore-requires-python "$@" || \
244+
install_options=""
245+
# pip has --no-build-isolation but no flag that turns the default back on...
246+
build_isolation_option="--no-build-isolation --no-binary :all:"
247+
while [ $# -gt 0 ]; do
248+
case "$1" in
249+
--build-isolation)
250+
# If a package requests build isolation, we allow it to provision
251+
# its build environment using the stored wheels.
252+
# We pass --find-links and remove the --no-binary option.
253+
# The SPKG needs to declare "setuptools_wheel" as a dependency.
254+
build_isolation_option="--find-links=$SAGE_SPKG_WHEELS"
255+
;;
256+
--no-deps)
257+
install_options="$install_options $1"
258+
;;
259+
*)
260+
break
261+
;;
262+
esac
263+
shift
264+
done
265+
python3 -m pip wheel --use-feature=in-tree-build --wheel-dir=dist --verbose --no-deps --no-index --isolated --ignore-requires-python $build_isolation_option "$@" || \
244266
sdh_die "Error building a wheel for $PKG_NAME"
245267

246-
sdh_store_and_pip_install_wheel .
268+
sdh_store_and_pip_install_wheel $install_options .
269+
}
270+
271+
sdh_pip_editable_install() {
272+
echo "Installing $PKG_NAME (editable mode)"
273+
python3 -m pip install --verbose --no-deps --no-index --no-build-isolation --isolated --editable "$@" || \
274+
sdh_die "Error installing $PKG_NAME"
247275
}
248276

249277
sdh_store_wheel() {

build/bin/sage-spkg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -498,15 +498,14 @@ export PKG_NAME="$PKG_NAME"
498498
export PKG_BASE="$PKG_BASE"
499499
export PKG_VER="$PKG_VER"
500500
501-
for lib in "\$SAGE_ROOT/build/bin/sage-dist-helpers" "\$SAGE_SRC/bin/sage-env-config" "\$SAGE_SRC/bin/sage-env" "\$SAGE_ROOT/build/bin/sage-build-env-config" "\$SAGE_ROOT/build/bin/sage-build-env"; do
501+
for lib in "\$SAGE_ROOT/build/bin/sage-dist-helpers" "\$SAGE_SRC/bin/sage-src-env-config" "\$SAGE_SRC/bin/sage-env-config" "\$SAGE_SRC/bin/sage-env" "\$SAGE_ROOT/build/bin/sage-build-env-config" "\$SAGE_ROOT/build/bin/sage-build-env"; do
502502
source "\$lib"
503503
if [ \$? -ne 0 ]; then
504504
echo >&2 "Error: failed to source \$lib"
505505
echo >&2 "Is \$SAGE_ROOT the correct SAGE_ROOT?"
506506
exit 1
507507
fi
508508
done
509-
export PATH="$SAGE_INST_LOCAL/bin:$PATH"
510509
511510
export SAGE_INST_LOCAL="$SAGE_INST_LOCAL"
512511
@@ -773,6 +772,7 @@ if [ "$SAGE_CHECK" = "yes" -o "$SAGE_CHECK" = "warn" ]; then
773772
if [ $? -ne 0 ]; then
774773
TEST_SUITE_RESULT="failed"
775774
if [ "$SAGE_CHECK" = "warn" ]; then
775+
# The following warning message must be consistent with SAGE_ROOT/build/make/install (see trac:32781)
776776
error_msg "Warning: Failures testing package $PKG_NAME (ignored)" "make check"
777777
else
778778
error_msg "Error testing package $PKG_NAME" "make check"

build/make/Makefile.in

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ SAGE_SPKG = sage-spkg
5252
# These are added to SAGE_SPKG in the call
5353
SAGE_SPKG_OPTIONS = @SAGE_SPKG_OPTIONS@
5454

55+
# Where the Sage distribution installs documentation.
56+
# set to empty if --disable-doc is used
57+
SAGE_DOCS = $(SAGE_LOCAL)
58+
5559
# Where the Sage distribution installs Python packages.
5660
# This can be overridden by 'make SAGE_VENV=/some/venv'.
5761
SAGE_VENV = @SAGE_VENV@
@@ -142,7 +146,7 @@ SCRIPT_PACKAGES = @SAGE_SCRIPT_PACKAGES@
142146
# inst_git = $(INST)/.dummy
143147

144148
$(foreach pkgname,$(BUILT_PACKAGES),\
145-
$(eval inst_$(pkgname) = $(foreach tree, $(trees_$(pkgname)), $($(tree))/$(SPKG_INST_RELDIR)/$(pkgname)-$(vers_$(pkgname)))))
149+
$(eval inst_$(pkgname) = $(foreach tree, $(trees_$(pkgname)), $(and $($(tree)), $($(tree))/$(SPKG_INST_RELDIR)/$(pkgname)-$(vers_$(pkgname))))))
146150
$(foreach pkgname,$(DUMMY_PACKAGES),\
147151
$(eval inst_$(pkgname) = $(SAGE_LOCAL)/$(SPKG_INST_RELDIR)/.dummy))
148152

@@ -157,7 +161,7 @@ $(SAGE_LOCAL)/$(SPKG_INST_RELDIR)/.dummy:
157161

158162

159163
# Filtered by installation tree
160-
$(foreach tree,SAGE_LOCAL SAGE_VENV, \
164+
$(foreach tree,SAGE_LOCAL SAGE_VENV SAGE_DOCS, \
161165
$(eval $(tree)_INSTALLED_PACKAGE_INSTS = \
162166
$(foreach pkgname,$(INSTALLED_PACKAGES), \
163167
$(if $(findstring $(tree),$(trees_$(pkgname))), \
@@ -228,10 +232,10 @@ build-start: all-build
228232
base-toolchain: _clean-broken-gcc base
229233
+$(MAKE_REC) toolchain
230234

231-
# All targets except for the base packages
235+
# All targets except for the base packages and except the documentation
232236
all-sage: \
233-
$(INSTALLED_PACKAGE_INSTS) \
234-
$(UNINSTALLED_PACKAGES_CLEANS)
237+
$(SAGE_LOCAL_INSTALLED_PACKAGE_INSTS) $(SAGE_LOCAL_UNINSTALLED_PACKAGES_CLEANS) \
238+
$(SAGE_VENV_INSTALLED_PACKAGE_INSTS) $(SAGE_VENV_UNINSTALLED_PACKAGES_CLEANS)
235239

236240
# Same but filtered by installation trees:
237241
all-build-local: toolchain-deps
@@ -244,6 +248,11 @@ all-build-venv: toolchain-deps
244248

245249
all-sage-venv: $(SAGE_VENV_INSTALLED_PACKAGE_INSTS) $(SAGE_VENV_UNINSTALLED_PACKAGES_CLEANS)
246250

251+
all-build-docs: toolchain-deps
252+
+$(MAKE_REC) all-sage-docs
253+
254+
all-sage-docs: $(SAGE_DOCS_INSTALLED_PACKAGE_INSTS) $(SAGE_DOCS_UNINSTALLED_PACKAGES_CLEANS)
255+
247256
# Download all packages which should be inside an sdist tarball (the -B
248257
# option to make forces all targets to be built unconditionally)
249258
download-for-sdist:
@@ -315,35 +324,28 @@ base: $(inst_patch) $(inst_pkgconf)
315324
#
316325
# $ ./sage --docbuild -H
317326

318-
# Building the documentation has many dependencies, because all
319-
# documented modules are imported and because we use matplotlib to
320-
# produce plots.
321-
DOC_DEPENDENCIES = sagelib sage_docbuild $(inst_sphinx) \
322-
| $(SAGERUNTIME) $(inst_maxima) $(inst_networkx) $(inst_scipy) $(inst_sympy) \
323-
$(inst_matplotlib) $(inst_pillow) $(inst_mathjax) $(inst_mpmath) \
324-
$(inst_ipykernel) $(inst_jupyter_client) $(inst_conway_polynomials) \
325-
$(inst_tachyon) $(inst_jmol) $(inst_thebe) $(inst_ipywidgets)
326-
327-
doc: doc-html
327+
doc: $(SAGE_DOCS_INSTALLED_PACKAGE_INSTS) $(SAGE_DOCS_UNINSTALLED_PACKAGES_CLEANS)
328328

329-
doc-html: $(DOC_DEPENDENCIES)
330-
$(AM_V_at)cd "$(SAGE_SRC)/doc" && sage-logger -p "$(MAKE) doc-html" $(SAGE_ROOT)/logs/dochtml.log
329+
# All doc-building is delegated to the script packages
330+
# sagemath_doc_html, sagemath_doc_pdf
331+
doc-html: sagemath_doc_html
331332

332333
# 'doc-html-no-plot': build docs without building the graphics coming
333334
# from the '.. plot' directive, in case you want to save a few
334335
# megabytes of disk space. 'doc-clean' is a prerequisite because the
335336
# presence of graphics is cached in src/doc/output.
336337
doc-html-no-plot: doc-clean
337-
$(AM_V_at)sage-logger -p "$(MAKE) SAGE_DOCBUILD_OPTS=\"$(SAGE_DOCBUILD_OPTS) --no-plot\" doc-html" $(SAGE_ROOT)/logs/dochtml.log
338+
+$(MAKE_REC) SAGE_DOCBUILD_OPTS="$(SAGE_DOCBUILD_OPTS) --no-plot" doc-html
338339

340+
# Using mathjax is actually the default, but this target can be used
341+
# to override an environment setting of SAGE_DOC_MATHJAX=no
339342
doc-html-mathjax:
340-
$(AM_V_at)sage-logger -p "$(MAKE) SAGE_DOCBUILD_OPTS=\"$(SAGE_DOCBUILD_OPTS) -j\" doc-html" $(SAGE_ROOT)/logs/dochtml.log
343+
+$(MAKE_REC) SAGE_DOCBUILD_OPTS="$(SAGE_DOCBUILD_OPTS) -j" doc-html
341344

342345
# Keep target 'doc-html-jsmath' for backwards compatibility.
343346
doc-html-jsmath: doc-html-mathjax
344347

345-
doc-pdf: $(DOC_DEPENDENCIES)
346-
$(AM_V_at)cd "$(SAGE_SRC)/doc" && sage-logger -p "$(MAKE) doc-pdf" $(SAGE_ROOT)/logs/docpdf.log
348+
doc-pdf: sagemath_doc_pdf
347349

348350
doc-clean: doc-src-clean doc-output-clean
349351

0 commit comments

Comments
 (0)