Github messages for voidlinux
 help / color / mirror / Atom feed
From: tornaria <tornaria@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] [WIP] New package: sagemath-9.5.beta8
Date: Mon, 27 Dec 2021 05:12:43 +0100	[thread overview]
Message-ID: <20211227041243.YIYnBzJKFHMa05iOlyrDP45wEdE15QJLQuL75gSEgKs@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-34030@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 629 bytes --]

There is an updated pull request by tornaria against master on the void-packages repository

https://github.com/tornaria/void-packages sagemath
https://github.com/void-linux/void-packages/pull/34030

[WIP] New package: sagemath-9.5.beta8
This is WIP, so I can get feedback.

Right now there is some issue with relocation, since `/builddir/sage-9.5.beta5` leaks all over the place. In particular starting sage complains this directory is missing... but it seems to work.

I'm unsure if the package name should be `sage` or `sagemath`.

A patch file from https://github.com/void-linux/void-packages/pull/34030.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-sagemath-34030.patch --]
[-- Type: text/x-diff, Size: 287780 bytes --]

From 749f05d0fb05f500a4d7568991cb984c2c31844b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Thu, 11 Nov 2021 10:36:03 -0300
Subject: [PATCH 01/19] New package: sage-9.5.beta5

---
 srcpkgs/sage/template | 74 +++++++++++++++++++++++++++++++++++++++++++
 srcpkgs/sage/update   |  3 ++
 2 files changed, 77 insertions(+)
 create mode 100644 srcpkgs/sage/template
 create mode 100644 srcpkgs/sage/update

diff --git a/srcpkgs/sage/template b/srcpkgs/sage/template
new file mode 100644
index 000000000000..2ef437238cb5
--- /dev/null
+++ b/srcpkgs/sage/template
@@ -0,0 +1,74 @@
+# Template file for 'sage'
+pkgname=sage
+version=9.5.beta5
+revision=1
+build_style=configure
+configure_args=--prefix=/usr/lib/sage-${version}
+make_check_target=ptest
+short_desc="Open source mathematics software"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-3.0-or-later"
+homepage="http://sagemath.org/"
+distfiles="http://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
+checksum=3b78ee848450d6881902bf68f4f3af17e1647e72c51e5fcdcb412c938ecbce57
+
+case ${version} in
+	# url for devel is different
+	*.beta*|*.rc*)
+		distfiles=${distfiles/sage\/src/sage\/devel}
+		;;
+esac
+
+# first we try to build native; we'll worry about cross later
+# besides, some dependencies are nocross
+nocross=yes
+
+# for now, to make install faster
+nostrip=yes
+
+# don't rewrite python shebang as sage uses its own python (for now)
+_no_python_shebang=yes
+
+do_install() {
+	vcopy /usr/lib/sage-${version} usr/lib/
+	vmkdir usr/bin
+	ln -s /usr/lib/sage-${version}/bin/sage ${DESTDIR}/usr/bin/
+}
+
+### copied from sage-deps, to keep in sync
+
+# hard dependencies
+makedepends+=" gcc make m4 perl binutils git tar libgomp-devel"
+
+# recommended dependencies
+makedepends+=" gcc-fortran openssl-devel"
+
+# bootstrap dependencies
+makedepends+=" automake gettext gettext-devel"
+
+# other host dependencies
+makedepends+=" cmake curl git ninja pandoc patch pkg-config python3 tox"
+
+# already in void
+makedepends+="
+ CoinMP-devel R arb-devel boost-devel bzip2-devel ecl eclib-devel
+ ecm-devel flintlib-devel freetype-devel gc-devel gd-devel giac-devel
+ glpk-devel gmp-devel gmpxx-devel gp2c graphviz gsl-devel isl-devel
+ libatomic_ops-devel libcurl-devel libffi-devel libmpc-devel
+ libpng-devel libxml2-devel mpfr-devel ncurses-devel openblas-devel
+ pari-devel pari-elldata-small pari-galdata pari-galpol-small
+ pari-seadata pcre-devel perl-File-Slurp perl-JSON perl-Term-ReadKey
+ perl-Term-ReadLine-Gnu perl-XML-LibXML perl-XML-LibXSLT
+ perl-XML-Writer ppl-devel python3-devel readline-devel sqlite-devel
+ zeromq-devel zlib-devel
+ FlintQS SuiteSparse-devel cddlib-devel fflas-ffpack fplll-devel gf2x-devel
+ givaro-devel igraph-devel iml-devel lcalc-devel linbox-devel
+ m4ri-devel m4rie-devel mpfi-devel ntl-devel perl-SVG rankwidth-devel
+ singular sympow zn_poly symmetrica-devel planarity-devel qhull libqhull-devel
+"
+
+# TODO: standard
+# brial cliquer gfan libbraiding libhomfly lrcalc nauty palp tachyon
+
+# TODO: optional
+# 4ti2 coxeter3 libnauty libsemigroups lrslib perl_mongodb
diff --git a/srcpkgs/sage/update b/srcpkgs/sage/update
new file mode 100644
index 000000000000..f797813dcde6
--- /dev/null
+++ b/srcpkgs/sage/update
@@ -0,0 +1,3 @@
+# for now, check both stable and devel releases
+site="http://mirrors.mit.edu/sage/src/
+http://mirrors.mit.edu/sage/devel/"

From 5cf16f37bed010e3d61fdd86ba1e1d41b23204db Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 13 Nov 2021 00:08:27 -0300
Subject: [PATCH 02/19] sagemath: update to sage-9.5.beta6

Also:
 - rename pkg from sage to sagemath
 - now it will build sage in-place at /usr/lib/sage-$version
 - the resulting pkg contains a lot of useless stuff that comes with the
   distribution; we'll have to clean up. E.g. SAGE_ROOT/upstream is
   definitely unnecessary (1.2G); possibly SAGE_ROOT/pkgs or at least
   SAGE_ROOT/pkgs/sagemath-standard/build (2.6G).
---
 srcpkgs/{sage => sagemath}/template | 46 +++++++++++++++++++++--------
 srcpkgs/{sage => sagemath}/update   |  1 +
 2 files changed, 35 insertions(+), 12 deletions(-)
 rename srcpkgs/{sage => sagemath}/template (67%)
 rename srcpkgs/{sage => sagemath}/update (90%)

diff --git a/srcpkgs/sage/template b/srcpkgs/sagemath/template
similarity index 67%
rename from srcpkgs/sage/template
rename to srcpkgs/sagemath/template
index 2ef437238cb5..fa5189ad259e 100644
--- a/srcpkgs/sage/template
+++ b/srcpkgs/sagemath/template
@@ -1,41 +1,63 @@
-# Template file for 'sage'
-pkgname=sage
-version=9.5.beta5
+# Template file for 'sagemath'
+pkgname=sagemath
+version=9.5.beta6
 revision=1
+wrksrc=sage-$version
 build_style=configure
-configure_args=--prefix=/usr/lib/sage-${version}
+configure_args="--enable-build-as-root"
 make_check_target=ptest
+# for now skip building docs
+make_build_target=build
 short_desc="Open source mathematics software"
 maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-or-later"
 homepage="http://sagemath.org/"
 distfiles="http://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
-checksum=3b78ee848450d6881902bf68f4f3af17e1647e72c51e5fcdcb412c938ecbce57
+checksum=7bae8cbb4db73147bd698261497102524bfadeb71ca66b1c68e96827bd5a8975
+
+# path where sage will be installed
+_SAGE_ROOT=/usr/lib/sage-${version}
 
 case ${version} in
 	# url for devel is different
-	*.beta*|*.rc*)
-		distfiles=${distfiles/sage\/src/sage\/devel}
-		;;
+	*.beta*|*.rc*) distfiles=${distfiles/sage\/src/sage\/devel} ;;
 esac
 
-# first we try to build native; we'll worry about cross later
-# besides, some dependencies are nocross
+# for now, skip check in ci, since we still have a few tests failing
+make_check=ci-skip
+
+# for now, just build native; we'll worry about cross later
+# besides, some dependencies are nocross (e.g. ntl)
 nocross=yes
 
 # for now, to make install faster
 nostrip=yes
 
+# don't shlib_provide anything
+noshlibprovides=yes
+
 # don't rewrite python shebang as sage uses its own python (for now)
 _no_python_shebang=yes
 
+post_extract() {
+	# sage wants to be built in place so let $wrksrc be a symlink
+	mv -T $wrksrc $_SAGE_ROOT
+	ln -sfT $_SAGE_ROOT $wrksrc
+}
+
+do_clean() {
+	# undo post_extract()
+	rm $wrksrc
+	mv $_SAGE_ROOT $wrksrc
+}
+
 do_install() {
 	vcopy /usr/lib/sage-${version} usr/lib/
 	vmkdir usr/bin
-	ln -s /usr/lib/sage-${version}/bin/sage ${DESTDIR}/usr/bin/
+	ln -s $_SAGE_ROOT/sage ${DESTDIR}/usr/bin/
 }
 
-### copied from sage-deps, to keep in sync
+### copied from sage-deps, to be kept in sync
 
 # hard dependencies
 makedepends+=" gcc make m4 perl binutils git tar libgomp-devel"
diff --git a/srcpkgs/sage/update b/srcpkgs/sagemath/update
similarity index 90%
rename from srcpkgs/sage/update
rename to srcpkgs/sagemath/update
index f797813dcde6..c33aba4e6df2 100644
--- a/srcpkgs/sage/update
+++ b/srcpkgs/sagemath/update
@@ -1,3 +1,4 @@
+pkgname=sage
 # for now, check both stable and devel releases
 site="http://mirrors.mit.edu/sage/src/
 http://mirrors.mit.edu/sage/devel/"

From d2a5d2967d58a7294a913af02c3d387700a997ea Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 13 Nov 2021 07:40:55 -0300
Subject: [PATCH 03/19] sagemath: revbump for changes

 - include patch fixing build of pyzmq on musl
 - add gengetopts and texinfo to makedepends
 - first attempt at cleanup: remove upstream sources and build artifacts
---
 srcpkgs/sagemath/patches/fix-pyzmq-musl.patch | 15 +++++++++++++++
 srcpkgs/sagemath/template                     |  9 +++++++--
 2 files changed, 22 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/fix-pyzmq-musl.patch

diff --git a/srcpkgs/sagemath/patches/fix-pyzmq-musl.patch b/srcpkgs/sagemath/patches/fix-pyzmq-musl.patch
new file mode 100644
index 000000000000..9190830d835e
--- /dev/null
+++ b/srcpkgs/sagemath/patches/fix-pyzmq-musl.patch
@@ -0,0 +1,15 @@
+diff --git a/build/pkgs/pyzmq/spkg-install.in b/build/pkgs/pyzmq/spkg-install.in
+index 0ce404ee5a..b7260c6d27 100644
+--- a/build/pkgs/pyzmq/spkg-install.in
++++ b/build/pkgs/pyzmq/spkg-install.in
+@@ -1,6 +1,9 @@
+ # Since we use environment vars we have to generate setup.cfg
+ 
+-echo "[build_ext]" > src/setup.cfg
++echo "[global]" > src/setup.cfg
++echo "skip_check_zmq = True" >> src/setup.cfg
++
++echo "[build_ext]" >> src/setup.cfg
+ 
+ # (I tried putting quotes around $SAGE_LOCAL to allow for spaces in
+ # the path---which is never used but is a good habit to support---but
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index fa5189ad259e..56166cd44272 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -1,7 +1,7 @@
 # Template file for 'sagemath'
 pkgname=sagemath
 version=9.5.beta6
-revision=1
+revision=2
 wrksrc=sage-$version
 build_style=configure
 configure_args="--enable-build-as-root"
@@ -52,7 +52,11 @@ do_clean() {
 }
 
 do_install() {
-	vcopy /usr/lib/sage-${version} usr/lib/
+	vcopy $_SAGE_ROOT usr/lib/
+	# cleanup: upstream sources and build artifacts
+	rm -rf ${DESTDIR}/$_SAGE_ROOT/upstream
+	rm -rf ${DESTDIR}/$_SAGE_ROOT/pkgs/*/build
+	# symlink main binary
 	vmkdir usr/bin
 	ln -s $_SAGE_ROOT/sage ${DESTDIR}/usr/bin/
 }
@@ -87,6 +91,7 @@ makedepends+="
  givaro-devel igraph-devel iml-devel lcalc-devel linbox-devel
  m4ri-devel m4rie-devel mpfi-devel ntl-devel perl-SVG rankwidth-devel
  singular sympow zn_poly symmetrica-devel planarity-devel qhull libqhull-devel
+ gengetopt texinfo
 "
 
 # TODO: standard

From 0f44374a63d3dc8b4f8f76eade4f1a12b855407c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sun, 14 Nov 2021 18:23:29 -0300
Subject: [PATCH 04/19] sagemath: revbump to 9.5.beta6_3 for changes

 - add depends needed for runtime and for testing
 - add python_version=3
 - disable skipping 03-rewrite-python-shebang as it seems to be harmless
   after adding python_version=3
 - fix cleaning up of $wrksrc and $_SAGE_ROOT
 - use sage-${version}_${revision} for the binary symlink; this way it
   won't override whatever sage is installed in the system so I can test
   on a live system.
---
 srcpkgs/sagemath/template | 23 +++++++++++++++++------
 1 file changed, 17 insertions(+), 6 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 56166cd44272..cfe97e039974 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -1,19 +1,24 @@
 # Template file for 'sagemath'
 pkgname=sagemath
 version=9.5.beta6
-revision=2
+revision=3
 wrksrc=sage-$version
 build_style=configure
 configure_args="--enable-build-as-root"
 make_check_target=ptest
 # for now skip building docs
 make_build_target=build
+depends="giac git FlintQS zn_poly sympow
+ pari-elldata-small pari-galdata pari-galpol-small pari-seadata-small
+ flintlib-devel gsl-devel ntl-devel eclib-devel pari-devel mpfr-devel
+ m4ri-devel gd-devel libpng-devel fflas-ffpack pkg-config gcc-fortran"
 short_desc="Open source mathematics software"
 maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-or-later"
 homepage="http://sagemath.org/"
 distfiles="http://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
 checksum=7bae8cbb4db73147bd698261497102524bfadeb71ca66b1c68e96827bd5a8975
+python_version=3
 
 # path where sage will be installed
 _SAGE_ROOT=/usr/lib/sage-${version}
@@ -37,7 +42,8 @@ nostrip=yes
 noshlibprovides=yes
 
 # don't rewrite python shebang as sage uses its own python (for now)
-_no_python_shebang=yes
+# after python_version=3, this seems harmless... strange...
+#_no_python_shebang=yes
 
 post_extract() {
 	# sage wants to be built in place so let $wrksrc be a symlink
@@ -46,9 +52,12 @@ post_extract() {
 }
 
 do_clean() {
-	# undo post_extract()
-	rm $wrksrc
-	mv $_SAGE_ROOT $wrksrc
+	rm -rf $wrksrc $_SAGE_ROOT
+}
+
+post_build() {
+	# install pytest for more tests
+	./sage -i pytest
 }
 
 do_install() {
@@ -58,7 +67,9 @@ do_install() {
 	rm -rf ${DESTDIR}/$_SAGE_ROOT/pkgs/*/build
 	# symlink main binary
 	vmkdir usr/bin
-	ln -s $_SAGE_ROOT/sage ${DESTDIR}/usr/bin/
+	# for now use sage-${version}_${revision} so it doesn't override
+	# other sage installed in the system
+	ln -sfT $_SAGE_ROOT/sage ${DESTDIR}/usr/bin/sage-${version}_${revision}
 }
 
 ### copied from sage-deps, to be kept in sync

From 3287c63fe084b63f4574f161716e49879fac9472 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 20 Nov 2021 19:01:21 -0300
Subject: [PATCH 05/19] sagemath: update to 9.5.beta7.

---
 srcpkgs/sagemath/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index cfe97e039974..3f9a3e9e077f 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -1,7 +1,7 @@
 # Template file for 'sagemath'
 pkgname=sagemath
-version=9.5.beta6
-revision=3
+version=9.5.beta7
+revision=1
 wrksrc=sage-$version
 build_style=configure
 configure_args="--enable-build-as-root"
@@ -17,7 +17,7 @@ maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-or-later"
 homepage="http://sagemath.org/"
 distfiles="http://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
-checksum=7bae8cbb4db73147bd698261497102524bfadeb71ca66b1c68e96827bd5a8975
+checksum=b81e1fe22d1b990bf1230260241ead016470da1f2f7b260f562d50f74c2904c7
 python_version=3
 
 # path where sage will be installed

From 49d39a6f97b28c806f5fe541693cb72886a735af Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 22 Nov 2021 10:23:03 -0300
Subject: [PATCH 06/19] sagemath: add more dependencies

Also:
 - add patches so more doctests pass
 - add do_check() to skip building docs
 - use https for distfiles
---
 ...08fd9d56d022ed28592f93f07ec8dce530ef.patch |  49 ++++++
 ...b99e0270f80cf03b80418372f45274f46051.patch | 163 ++++++++++++++++++
 ...a86908daf60b25e66e6a189c51ada7e0a732.patch |  25 +++
 .../patches/skip-optional-dochtml.patch       |  13 ++
 srcpkgs/sagemath/template                     |  15 +-
 5 files changed, 260 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/17e308fd9d56d022ed28592f93f07ec8dce530ef.patch
 create mode 100644 srcpkgs/sagemath/patches/2ee7b99e0270f80cf03b80418372f45274f46051.patch
 create mode 100644 srcpkgs/sagemath/patches/f5f7a86908daf60b25e66e6a189c51ada7e0a732.patch
 create mode 100644 srcpkgs/sagemath/patches/skip-optional-dochtml.patch

diff --git a/srcpkgs/sagemath/patches/17e308fd9d56d022ed28592f93f07ec8dce530ef.patch b/srcpkgs/sagemath/patches/17e308fd9d56d022ed28592f93f07ec8dce530ef.patch
new file mode 100644
index 000000000000..e295bb91af5b
--- /dev/null
+++ b/srcpkgs/sagemath/patches/17e308fd9d56d022ed28592f93f07ec8dce530ef.patch
@@ -0,0 +1,49 @@
+From 17e308fd9d56d022ed28592f93f07ec8dce530ef Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 15 Nov 2021 23:37:15 -0500
+Subject: Trac #32880: use GAP instead of Singular to test
+ _get_shared_lib_path().
+
+We still have a doctest for _get_shared_lib_path() that tries to find
+the path to libSingular; however, we no longer actually need it to
+find libSingular because the path to libSingular is contained in
+LIBSINGULAR_PATH.
+
+Since _get_shared_lib_path() is a bit fragile, this commit replaces
+that test case with one for libgap, which is still always installed
+via SPKG and for which we still need _get_shared_lib_path() to be able
+to find the path.
+---
+ src/sage/env.py | 12 ++----------
+ 1 file changed, 2 insertions(+), 10 deletions(-)
+
+diff --git a/src/sage/env.py b/src/sage/env.py
+index 40ace13..3bd4826 100644
+--- a/src/sage/env.py
++++ b/src/sage/env.py
+@@ -267,20 +267,12 @@ def _get_shared_lib_path(*libnames: str) -> Optional[str]:
+ 
+     EXAMPLES::
+ 
+-        sage: import sys
+-        sage: from fnmatch import fnmatch
+         sage: from sage.env import _get_shared_lib_path
+-        sage: lib_filename = _get_shared_lib_path("Singular", "singular-Singular")
+-        sage: if sys.platform == 'cygwin':
+-        ....:     pattern = "*/cygSingular-*.dll"
+-        ....: elif sys.platform == 'darwin':
+-        ....:     pattern = "*/libSingular-*.dylib"
+-        ....: else:
+-        ....:     pattern = "*/lib*Singular-*.so"
+-        sage: fnmatch(str(lib_filename), pattern)
++        sage: "gap" in _get_shared_lib_path("gap")
+         True
+         sage: _get_shared_lib_path("an_absurd_lib") is None
+         True
++
+     """
+ 
+     for libname in libnames:
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/2ee7b99e0270f80cf03b80418372f45274f46051.patch b/srcpkgs/sagemath/patches/2ee7b99e0270f80cf03b80418372f45274f46051.patch
new file mode 100644
index 000000000000..32e641edb3aa
--- /dev/null
+++ b/srcpkgs/sagemath/patches/2ee7b99e0270f80cf03b80418372f45274f46051.patch
@@ -0,0 +1,163 @@
+From 2ee7b99e0270f80cf03b80418372f45274f46051 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Samuel=20Leli=C3=A8vre?= <samuel.lelievre@gmail.com>
+Date: Sat, 20 Nov 2021 13:34:16 +0100
+Subject: 32905: abs tol for some CBF and RBF doctests
+
+---
+ src/sage/functions/gamma.py    |  2 +-
+ src/sage/rings/complex_arb.pyx |  6 +++---
+ src/sage/rings/real_arb.pyx    | 24 ++++++++++++------------
+ src/sage/symbolic/function.pyx |  2 +-
+ 4 files changed, 17 insertions(+), 17 deletions(-)
+
+diff --git a/src/sage/functions/gamma.py b/src/sage/functions/gamma.py
+index 3a4deef..307deb1 100644
+--- a/src/sage/functions/gamma.py
++++ b/src/sage/functions/gamma.py
+@@ -1049,7 +1049,7 @@ class Function_beta(GinacFunction):
+         r"""
+         TESTS::
+ 
+-            sage: RBF(beta(sin(3),sqrt(RBF(2).add_error(1e-8)/3)))
++            sage: RBF(beta(sin(3),sqrt(RBF(2).add_error(1e-8)/3)))  # abs tol 6e-7
+             [7.407662 +/- 6.17e-7]
+         """
+         return [x, y]
+diff --git a/src/sage/rings/complex_arb.pyx b/src/sage/rings/complex_arb.pyx
+index ce9b1b1..7e10ec9 100644
+--- a/src/sage/rings/complex_arb.pyx
++++ b/src/sage/rings/complex_arb.pyx
+@@ -4189,7 +4189,7 @@ cdef class ComplexBall(RingElement):
+ 
+         TESTS:
+ 
+-            sage: CBF(Ei(I))
++            sage: CBF(Ei(I))  # abs tol 1e-16
+             [0.337403922900968 +/- 3.76e-16] + [2.51687939716208 +/- 2.01e-15]*I
+         """
+         cdef ComplexBall result = self._new()
+@@ -4239,7 +4239,7 @@ cdef class ComplexBall(RingElement):
+ 
+         TESTS:
+ 
+-            sage: CBF(Ci(I))
++            sage: CBF(Ci(I))  # abs tol 1e-17
+             [0.837866940980208 +/- 4.72e-16] + [1.570796326794897 +/- 5.54e-16]*I
+         """
+         cdef ComplexBall result = self._new()
+@@ -4291,7 +4291,7 @@ cdef class ComplexBall(RingElement):
+ 
+         TESTS:
+ 
+-            sage: CBF(Chi(I))
++            sage: CBF(Chi(I))  # abs tol 1e-16
+             [0.337403922900968 +/- 3.25e-16] + [1.570796326794897 +/- 5.54e-16]*I
+         """
+         cdef ComplexBall result = self._new()
+diff --git a/src/sage/rings/real_arb.pyx b/src/sage/rings/real_arb.pyx
+index 80a840e..49caa63 100644
+--- a/src/sage/rings/real_arb.pyx
++++ b/src/sage/rings/real_arb.pyx
+@@ -3489,12 +3489,12 @@ cdef class RealBall(RingElement):
+ 
+         EXAMPLES::
+ 
+-            sage: RBF(1).Ei()
++            sage: RBF(1).Ei()  # abs tol 5e-16
+             [1.89511781635594 +/- 4.94e-15]
+ 
+         TESTS::
+ 
+-            sage: RBF(Ei(1))
++            sage: RBF(Ei(1))  # abs tol 5e-16
+             [1.89511781635594 +/- 4.94e-15]
+         """
+         cdef RealBall res = self._new()
+@@ -3531,12 +3531,12 @@ cdef class RealBall(RingElement):
+ 
+         EXAMPLES::
+ 
+-            sage: RBF(1).Ci()
++            sage: RBF(1).Ci()  # abs tol 1e-16
+             [0.337403922900968 +/- 3.25e-16]
+ 
+         TESTS::
+ 
+-            sage: RBF(Ci(1))
++            sage: RBF(Ci(1))  # abs tol 1e-16
+             [0.337403922900968 +/- 3.25e-16]
+         """
+         cdef RealBall res = self._new()
+@@ -3575,12 +3575,12 @@ cdef class RealBall(RingElement):
+ 
+         EXAMPLES::
+ 
+-            sage: RBF(1).Chi()
++            sage: RBF(1).Chi()  # abs tol 1e-17
+             [0.837866940980208 +/- 4.72e-16]
+ 
+         TESTS::
+ 
+-            sage: RBF(Chi(1))
++            sage: RBF(Chi(1))  # abs tol 1e-17
+             [0.837866940980208 +/- 4.72e-16]
+         """
+         cdef RealBall res = self._new()
+@@ -3597,7 +3597,7 @@ cdef class RealBall(RingElement):
+ 
+         EXAMPLES::
+ 
+-            sage: RBF(3).li()
++            sage: RBF(3).li()  # abs tol 1e-15
+             [2.16358859466719 +/- 4.72e-15]
+ 
+         TESTS::
+@@ -3621,7 +3621,7 @@ cdef class RealBall(RingElement):
+ 
+         EXAMPLES::
+ 
+-            sage: RBF(3).Li()
++            sage: RBF(3).Li()  # abs tol 1e-15
+             [1.11842481454970 +/- 7.61e-15]
+         """
+         cdef RealBall res = self._new()
+@@ -3648,9 +3648,9 @@ cdef class RealBall(RingElement):
+ 
+         EXAMPLES::
+ 
+-            sage: RBF(sin(3)).beta(RBF(2/3).sqrt())
++            sage: RBF(sin(3)).beta(RBF(2/3).sqrt())  # abs tol 1e-13
+             [7.407661629415 +/- 1.07e-13]
+-            sage: RealBallField(100)(7/2).beta(1)
++            sage: RealBallField(100)(7/2).beta(1)  # abs tol 1e-30
+             [0.28571428571428571428571428571 +/- 5.23e-30]
+             sage: RealBallField(100)(7/2).beta(1, 1/2)
+             [0.025253813613805268728601584361 +/- 2.53e-31]
+@@ -3685,9 +3685,9 @@ cdef class RealBall(RingElement):
+ 
+             sage: RBF(1/2).gamma()
+             [1.772453850905516 +/- ...e-16]
+-            sage: RBF(gamma(3/2, RBF(2).sqrt()))
++            sage: RBF(gamma(3/2, RBF(2).sqrt()))  # abs tol 2e-17
+             [0.37118875695353 +/- 3.00e-15]
+-            sage: RBF(3/2).gamma_inc(RBF(2).sqrt())
++            sage: RBF(3/2).gamma_inc(RBF(2).sqrt())  # abs tol 2e-17
+             [0.37118875695353 +/- 3.00e-15]
+ 
+         .. SEEALSO::
+diff --git a/src/sage/symbolic/function.pyx b/src/sage/symbolic/function.pyx
+index 89cdce5..480a601 100644
+--- a/src/sage/symbolic/function.pyx
++++ b/src/sage/symbolic/function.pyx
+@@ -626,7 +626,7 @@ cdef class Function(SageObject):
+             sage: b = RBF(3/2, 1e-10)
+             sage: airy_ai(b)
+             airy_ai([1.500000000 +/- 1.01e-10])
+-            sage: gamma(b, 1)
++            sage: gamma(b, 1)  # abs tol 4.5e-9
+             [0.50728223 +/- 4.67e-9]
+             sage: hurwitz_zeta(b, b)
+             hurwitz_zeta([1.500000000 +/- 1.01e-10], [1.500000000 +/- 1.01e-10])
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/f5f7a86908daf60b25e66e6a189c51ada7e0a732.patch b/srcpkgs/sagemath/patches/f5f7a86908daf60b25e66e6a189c51ada7e0a732.patch
new file mode 100644
index 000000000000..ec0467757ee7
--- /dev/null
+++ b/srcpkgs/sagemath/patches/f5f7a86908daf60b25e66e6a189c51ada7e0a732.patch
@@ -0,0 +1,25 @@
+From f5f7a86908daf60b25e66e6a189c51ada7e0a732 Mon Sep 17 00:00:00 2001
+From: Antonio Rojas <arojas@archlinux.org>
+Date: Sat, 30 Oct 2021 10:21:52 +0200
+Subject: Fix test failure caused by new warning
+
+---
+ src/sage/lfunctions/pari.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/sage/lfunctions/pari.py b/src/sage/lfunctions/pari.py
+index 0aaf91c..33d5266 100644
+--- a/src/sage/lfunctions/pari.py
++++ b/src/sage/lfunctions/pari.py
+@@ -316,7 +316,7 @@ def lfun_number_field(K):
+         sage: L(3)
+         1.15202784126080
+         sage: L(0)
+-        0.000000000000000
++        ...0.000000000000000
+     """
+     return pari.lfuncreate(K)
+ 
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/skip-optional-dochtml.patch b/srcpkgs/sagemath/patches/skip-optional-dochtml.patch
new file mode 100644
index 000000000000..e49b18a52fbc
--- /dev/null
+++ b/srcpkgs/sagemath/patches/skip-optional-dochtml.patch
@@ -0,0 +1,13 @@
+diff --git a/src/bin/sage-runtests b/src/bin/sage-runtests
+index 288c889bd1..b9a4d3038a 100755
+--- a/src/bin/sage-runtests
++++ b/src/bin/sage-runtests
+@@ -15,7 +15,7 @@ os.environ['SAGE_STARTUP_FILE'] = os.path.join(DOT_SAGE, 'init-doctests.sage')
+ 
+ def _get_optional_defaults():
+     """Return the default value for the --optional flag."""
+-    optional = ['sage', 'dochtml', 'optional']
++    optional = ['sage', 'optional']
+ 
+     # This should be good-enough to determine if we are in a sage source
+     # repository working tree
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 3f9a3e9e077f..d4130be12a7a 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -16,7 +16,7 @@ short_desc="Open source mathematics software"
 maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-or-later"
 homepage="http://sagemath.org/"
-distfiles="http://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
+distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
 checksum=b81e1fe22d1b990bf1230260241ead016470da1f2f7b260f562d50f74c2904c7
 python_version=3
 
@@ -47,6 +47,7 @@ noshlibprovides=yes
 
 post_extract() {
 	# sage wants to be built in place so let $wrksrc be a symlink
+	rm -rf $_SAGE_ROOT
 	mv -T $wrksrc $_SAGE_ROOT
 	ln -sfT $_SAGE_ROOT $wrksrc
 }
@@ -72,6 +73,11 @@ do_install() {
 	ln -sfT $_SAGE_ROOT/sage ${DESTDIR}/usr/bin/sage-${version}_${revision}
 }
 
+do_check() {
+	# since make check will build the docs, run test like this instead
+	./sage -tp ${XBPS_MAKEJOBS} --all
+}
+
 ### copied from sage-deps, to be kept in sync
 
 # hard dependencies
@@ -103,10 +109,9 @@ makedepends+="
  m4ri-devel m4rie-devel mpfi-devel ntl-devel perl-SVG rankwidth-devel
  singular sympow zn_poly symmetrica-devel planarity-devel qhull libqhull-devel
  gengetopt texinfo
+ brial-devel cliquer-devel gfan libbraiding-devel libhomfly-devel
+ lrcalc-devel nauty-devel palp tachyon
 "
 
-# TODO: standard
-# brial cliquer gfan libbraiding libhomfly lrcalc nauty palp tachyon
-
 # TODO: optional
-# 4ti2 coxeter3 libnauty libsemigroups lrslib perl_mongodb
+# 4ti2 coxeter3 libsemigroups lrslib pdf2svg perl_mongodb polymake

From 41ce0beba7c2fa30d12681407454fc9661922981 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 22 Nov 2021 15:16:23 -0300
Subject: [PATCH 07/19] sagemath: more changes

 - do not install pytest, which is still broken (pending trac 31924)
 - add patch from sagemath trac 32892
 - replace the patch to fix the build of pyzmq on musl by a different
   one from sagemath trac 32828 which is what will be merged upstream
 - patch to fix doctest failure on musl (src/sage/misc/gperftools.py)
 - rebase on latest sympow rev to fix doctest failure on musl
   (src/sage/lfunctions/sympow.py)
 - enable check on CI to see what happens...
---
 ...hat-fixes-ctypes.util.find_library-c.patch |  64 +++++++++
 ...754ad30c6a1bd1fdbd6d62011055bf13b24a.patch |  27 ++++
 srcpkgs/sagemath/patches/fix-pyzmq-musl.patch |  15 --
 .../patches/trac-32828-fix-pyzmq.patch        | 134 ++++++++++++++++++
 srcpkgs/sagemath/template                     |  15 +-
 5 files changed, 235 insertions(+), 20 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/0001-Add-a-patch-that-fixes-ctypes.util.find_library-c.patch
 create mode 100644 srcpkgs/sagemath/patches/89b8754ad30c6a1bd1fdbd6d62011055bf13b24a.patch
 delete mode 100644 srcpkgs/sagemath/patches/fix-pyzmq-musl.patch
 create mode 100644 srcpkgs/sagemath/patches/trac-32828-fix-pyzmq.patch

diff --git a/srcpkgs/sagemath/patches/0001-Add-a-patch-that-fixes-ctypes.util.find_library-c.patch b/srcpkgs/sagemath/patches/0001-Add-a-patch-that-fixes-ctypes.util.find_library-c.patch
new file mode 100644
index 000000000000..4f89c2bd8fbc
--- /dev/null
+++ b/srcpkgs/sagemath/patches/0001-Add-a-patch-that-fixes-ctypes.util.find_library-c.patch
@@ -0,0 +1,64 @@
+From dc1a0e8168a9ffb4fbf07dd03c0846b4933a6dbe Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Mon, 22 Nov 2021 23:57:37 -0300
+Subject: [PATCH] Add a patch that fixes ctypes.util.find_library('c')
+
+The issue causes a failure doctesting src/sage/misc/gperftools.py
+---
+ .../python3/patches/musl-find_library.patch   | 44 +++++++++++++++++++
+ 1 file changed, 44 insertions(+)
+ create mode 100644 build/pkgs/python3/patches/musl-find_library.patch
+
+diff --git a/build/pkgs/python3/patches/musl-find_library.patch b/build/pkgs/python3/patches/musl-find_library.patch
+new file mode 100644
+index 0000000000..82f436b407
+--- /dev/null
++++ b/build/pkgs/python3/patches/musl-find_library.patch
+@@ -0,0 +1,44 @@
++--- a/Lib/ctypes/util.py
+++++ b/Lib/ctypes/util.py
++@@ -204,6 +204,41 @@
++         def find_library(name, is64 = False):
++             return _get_soname(_findLib_crle(name, is64) or _findLib_gcc(name))
++ 
+++    elif True:
+++
+++        # Patched for Alpine Linux / musl - search manually system paths
+++        def _is_elf(filepath):
+++            try:
+++                with open(filepath, 'rb') as fh:
+++                    return fh.read(4) == b'\x7fELF'
+++            except:
+++                return False
+++
+++        def find_library(name):
+++            from glob import glob
+++            # absolute name?
+++            if os.path.isabs(name):
+++                return name
+++            # special case for libm, libcrypt and libpthread and musl
+++            if name in ['m', 'crypt', 'pthread']:
+++                name = 'c'
+++            elif name in ['libm.so', 'libcrypt.so', 'libpthread.so']:
+++                name = 'libc.so'
+++            # search in standard locations (musl order)
+++            paths = ['/lib', '/usr/local/lib', '/usr/lib']
+++            if 'LD_LIBRARY_PATH' in os.environ:
+++                paths = os.environ['LD_LIBRARY_PATH'].split(':') + paths
+++            for d in paths:
+++                f = os.path.join(d, name)
+++                if _is_elf(f):
+++                    return os.path.basename(f)
+++
+++                prefix = os.path.join(d, 'lib'+name)
+++                for suffix in ['.so', '.so.*']:
+++                    for f in glob('{0}{1}'.format(prefix, suffix)):
+++                        if _is_elf(f):
+++                            return os.path.basename(f)
+++
++     else:
++ 
++         def _findSoname_ldconfig(name):
+-- 
+2.34.0
+
diff --git a/srcpkgs/sagemath/patches/89b8754ad30c6a1bd1fdbd6d62011055bf13b24a.patch b/srcpkgs/sagemath/patches/89b8754ad30c6a1bd1fdbd6d62011055bf13b24a.patch
new file mode 100644
index 000000000000..ea05b2b6a524
--- /dev/null
+++ b/srcpkgs/sagemath/patches/89b8754ad30c6a1bd1fdbd6d62011055bf13b24a.patch
@@ -0,0 +1,27 @@
+From 89b8754ad30c6a1bd1fdbd6d62011055bf13b24a Mon Sep 17 00:00:00 2001
+From: Tobias Diez <code@tobiasdiez.com>
+Date: Wed, 17 Nov 2021 22:24:32 +0100
+Subject: Fix exit code for pytest in case of no matched files
+
+---
+ src/bin/sage-runtests | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/bin/sage-runtests b/src/bin/sage-runtests
+index 882456d..8b362ca 100755
+--- a/src/bin/sage-runtests
++++ b/src/bin/sage-runtests
+@@ -157,6 +157,10 @@ if __name__ == "__main__":
+         if args.verbose:
+             pytest_options.append("-v")
+         exit_code_pytest = pytest.main(pytest_options + args.filenames)
++        if exit_code_pytest == 5:
++            # Exit code 5 means there were no test files, pass in this case
++            exit_code_pytest = 0
++
+     except ModuleNotFoundError:
+         print("Pytest is not installed, skip checking tests that rely on it.")
+ 
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/fix-pyzmq-musl.patch b/srcpkgs/sagemath/patches/fix-pyzmq-musl.patch
deleted file mode 100644
index 9190830d835e..000000000000
--- a/srcpkgs/sagemath/patches/fix-pyzmq-musl.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff --git a/build/pkgs/pyzmq/spkg-install.in b/build/pkgs/pyzmq/spkg-install.in
-index 0ce404ee5a..b7260c6d27 100644
---- a/build/pkgs/pyzmq/spkg-install.in
-+++ b/build/pkgs/pyzmq/spkg-install.in
-@@ -1,6 +1,9 @@
- # Since we use environment vars we have to generate setup.cfg
- 
--echo "[build_ext]" > src/setup.cfg
-+echo "[global]" > src/setup.cfg
-+echo "skip_check_zmq = True" >> src/setup.cfg
-+
-+echo "[build_ext]" >> src/setup.cfg
- 
- # (I tried putting quotes around $SAGE_LOCAL to allow for spaces in
- # the path---which is never used but is a good habit to support---but
diff --git a/srcpkgs/sagemath/patches/trac-32828-fix-pyzmq.patch b/srcpkgs/sagemath/patches/trac-32828-fix-pyzmq.patch
new file mode 100644
index 000000000000..426932c95c9b
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-32828-fix-pyzmq.patch
@@ -0,0 +1,134 @@
+diff --git a/build/pkgs/pyzmq/checksums.ini b/build/pkgs/pyzmq/checksums.ini
+index 3824fd2ce9..20509db618 100644
+--- a/build/pkgs/pyzmq/checksums.ini
++++ b/build/pkgs/pyzmq/checksums.ini
+@@ -1,5 +1,5 @@
+ tarball=pyzmq-VERSION.tar.gz
+-sha1=50abf6482a6395f15dce0b2774021e12c9f4faad
+-md5=f261acf884460e93d30f7113c8e9242e
+-cksum=1661206741
++sha1=d8bb8cb345c0bfd9e67a95ac796bf4b10354dde6
++md5=ecf13c72fbea05ba5ddc771295409d48
++cksum=1680251717
+ upstream_url=https://pypi.io/packages/source/p/pyzmq/pyzmq-VERSION.tar.gz
+diff --git a/build/pkgs/pyzmq/package-version.txt b/build/pkgs/pyzmq/package-version.txt
+index 0398faf11c..8326e27f9b 100644
+--- a/build/pkgs/pyzmq/package-version.txt
++++ b/build/pkgs/pyzmq/package-version.txt
+@@ -1 +1 @@
+-22.2.1
++22.3.0
+diff --git a/build/pkgs/pyzmq/spkg-install.in b/build/pkgs/pyzmq/spkg-install.in
+index 0ce404ee5a..069d87767f 100644
+--- a/build/pkgs/pyzmq/spkg-install.in
++++ b/build/pkgs/pyzmq/spkg-install.in
+@@ -1,17 +1,11 @@
+-# Since we use environment vars we have to generate setup.cfg
+-
+-echo "[build_ext]" > src/setup.cfg
+-
+-# (I tried putting quotes around $SAGE_LOCAL to allow for spaces in
+-# the path---which is never used but is a good habit to support---but
+-# that simply does not work. Sorry.)
+-
+-echo "library_dirs = $SAGE_LOCAL/lib/" >> src/setup.cfg
+-echo "include_dirs = $SAGE_LOCAL/include/" >> src/setup.cfg
+-
+-echo "[configure]" >> src/setup.cfg
+-
+ cd src
+ 
++# Generate setup.cfg
++cat > setup.cfg <<EOF
++[global]
++zmq_prefix = $SAGE_LOCAL
++no_libzmq_extension = True
++EOF
++
+ # Configure and install
+ sdh_pip_install .
+diff --git a/build/pkgs/setuptools/checksums.ini b/build/pkgs/setuptools/checksums.ini
+index 6a280871e7..d9290d04ff 100644
+--- a/build/pkgs/setuptools/checksums.ini
++++ b/build/pkgs/setuptools/checksums.ini
+@@ -1,5 +1,5 @@
+ tarball=setuptools-VERSION.tar.gz
+-sha1=5d97de0e774b2269c85685a4aa8fd5956bcfd2bb
+-md5=ff20ab7e0d51c5ad0a9438c50e598c06
+-cksum=3564252314
++sha1=cd4e5d1f7c47f86354fc89d040d869cde244da3b
++md5=79b36f59270a6f2e45d6a9a0c6dc68c1
++cksum=430889097
+ upstream_url=https://pypi.io/packages/source/s/setuptools/setuptools-VERSION.tar.gz
+diff --git a/build/pkgs/setuptools/package-version.txt b/build/pkgs/setuptools/package-version.txt
+index e6ea636051..aec1257e4c 100644
+--- a/build/pkgs/setuptools/package-version.txt
++++ b/build/pkgs/setuptools/package-version.txt
+@@ -1 +1 @@
+-58.2.0
++59.2.0
+diff --git a/build/pkgs/zeromq/checksums.ini b/build/pkgs/zeromq/checksums.ini
+index ea8c36bce5..dc802612dd 100644
+--- a/build/pkgs/zeromq/checksums.ini
++++ b/build/pkgs/zeromq/checksums.ini
+@@ -1,4 +1,5 @@
+ tarball=zeromq-VERSION.tar.gz
+-sha1=1132f839d703486c4ee1cf22f056585dfbb329c2
+-md5=a1c95b34384257e986842f4d006957b8
+-cksum=136261411
++sha1=47277a64749049123d1401600e8cfbab10a3ae28
++md5=c897d4005a3f0b8276b00b7921412379
++cksum=1500782345
++upstream_url=https://github.com/zeromq/libzmq/releases/download/vVERSION/zeromq-VERSION.tar.gz
+diff --git a/build/pkgs/zeromq/package-version.txt b/build/pkgs/zeromq/package-version.txt
+index df0228dfae..eda862a98c 100644
+--- a/build/pkgs/zeromq/package-version.txt
++++ b/build/pkgs/zeromq/package-version.txt
+@@ -1 +1 @@
+-4.2.5
++4.3.4
+diff --git a/build/pkgs/zeromq/patches/getrandom.patch b/build/pkgs/zeromq/patches/getrandom.patch
+deleted file mode 100644
+index e665114e1c..0000000000
+--- a/build/pkgs/zeromq/patches/getrandom.patch
++++ /dev/null
+@@ -1,39 +0,0 @@
+-Patch taken from upstream git repo
+-and after running aclocal && autoconf
+-and removing changes to autotools input files
+-
+-commit 4ff814f204ee38177a392526cf12c8c0019b480f
+-Author: Luca Boccassi <luca.boccassi@gmail.com>
+-Date:   Wed May 9 10:41:20 2018 +0100
+-
+-    Problem: getrandom test does not check if it's working
+-
+-    Solution: check return value in autoconf and CMake. On some platforms
+-    the function is available but not implemented (eg: GNU/Hurd).
+-
+-diff -ru zeromq-4.2.5//builds/cmake/Modules/ZMQSourceRunChecks.cmake b/builds/cmake/Modules/ZMQSourceRunChecks.cmake
+---- zeromq-4.2.5//builds/cmake/Modules/ZMQSourceRunChecks.cmake	2018-03-23 20:33:36.000000000 +0100
+-+++ b/builds/cmake/Modules/ZMQSourceRunChecks.cmake	2018-07-24 12:39:23.340035053 +0200
+-@@ -287,7 +287,8 @@
+- int main (int argc, char *argv [])
+- {
+-     char buf[4];
+--    getrandom(buf, 4, 0);
+-+    int rc = getrandom(buf, 4, 0);
+-+    return rc == -1 ? 1 : 0;
+- }
+- "
+-     ZMQ_HAVE_GETRANDOM)
+-diff -ru zeromq-4.2.5//configure b/configure
+---- zeromq-4.2.5//configure	2018-03-23 20:34:18.000000000 +0100
+-+++ b/configure	2018-07-24 12:39:49.018035120 +0200
+-@@ -23315,7 +23315,8 @@
+- int main (int argc, char *argv [])
+- {
+-     char buf[4];
+--    getrandom(buf, 4, 0);
+-+    int rc = getrandom(buf, 4, 0);
+-+    return rc == -1 ? 1 : 0;
+- }
+- 
+- _ACEOF
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index d4130be12a7a..622ee06d85b8 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -29,7 +29,7 @@ case ${version} in
 esac
 
 # for now, skip check in ci, since we still have a few tests failing
-make_check=ci-skip
+#make_check=ci-skip
 
 # for now, just build native; we'll worry about cross later
 # besides, some dependencies are nocross (e.g. ntl)
@@ -56,10 +56,15 @@ do_clean() {
 	rm -rf $wrksrc $_SAGE_ROOT
 }
 
-post_build() {
-	# install pytest for more tests
-	./sage -i pytest
-}
+# DISABLED pytest since it brings more harm than good
+# it seems currently all it does is to look for files matching
+# *_test.py and run pytest on those, but I don't think these are meant
+# to be run on pytest (and one even gives a failure...)
+#
+# post_build() {
+# 	# install pytest for more tests
+# 	./sage -i pytest
+# }
 
 do_install() {
 	vcopy $_SAGE_ROOT usr/lib/

From 0f89c4d9123f057207bd6398518bace596cada63 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Thu, 25 Nov 2021 22:47:35 -0300
Subject: [PATCH 08/19] sagemath: more changes

 - skip a doctest which fails due to giac 1.7.0
 - rename patches to include trac ticket #
 - add a patch to use system linbox (needs to run ./bootstrap)
 - look for an optional file ${XBPS_DISTDIR}/sagemath-check ; if that
   file exists, its contents are used as arguments for sage check
   Intended usage: place the names of files that you want to doctest
   instead of all files (useful when you have a few failing doctests you
   are trying to fix)
---
 ...p-doctest-giac-1.7.0--see-trac-31563.patch | 14 +++++++++
 ...119d27d091b3894860547673c2f6b224f61a.patch | 31 +++++++++++++++++++
 ...86908daf60b25e66e6a189c51ada7e0a732.patch} |  0
 ...8fd9d56d022ed28592f93f07ec8dce530ef.patch} |  0
 ...54ad30c6a1bd1fdbd6d62011055bf13b24a.patch} |  0
 ...99e0270f80cf03b80418372f45274f46051.patch} |  0
 srcpkgs/sagemath/template                     | 10 +++++-
 7 files changed, 54 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/sagemath/patches/skip-doctest-giac-1.7.0--see-trac-31563.patch
 create mode 100644 srcpkgs/sagemath/patches/trac-29631-7072119d27d091b3894860547673c2f6b224f61a.patch
 rename srcpkgs/sagemath/patches/{f5f7a86908daf60b25e66e6a189c51ada7e0a732.patch => trac-32797-f5f7a86908daf60b25e66e6a189c51ada7e0a732.patch} (100%)
 rename srcpkgs/sagemath/patches/{17e308fd9d56d022ed28592f93f07ec8dce530ef.patch => trac-32880-17e308fd9d56d022ed28592f93f07ec8dce530ef.patch} (100%)
 rename srcpkgs/sagemath/patches/{89b8754ad30c6a1bd1fdbd6d62011055bf13b24a.patch => trac-32892-89b8754ad30c6a1bd1fdbd6d62011055bf13b24a.patch} (100%)
 rename srcpkgs/sagemath/patches/{2ee7b99e0270f80cf03b80418372f45274f46051.patch => trac-32905-2ee7b99e0270f80cf03b80418372f45274f46051.patch} (100%)

diff --git a/srcpkgs/sagemath/patches/skip-doctest-giac-1.7.0--see-trac-31563.patch b/srcpkgs/sagemath/patches/skip-doctest-giac-1.7.0--see-trac-31563.patch
new file mode 100644
index 000000000000..563bb8526788
--- /dev/null
+++ b/srcpkgs/sagemath/patches/skip-doctest-giac-1.7.0--see-trac-31563.patch
@@ -0,0 +1,14 @@
+--- a/src/sage/functions/min_max.py
++++ b/src/sage/functions/min_max.py
+@@ -233,9 +233,9 @@ class MaxSymbolic(MinMax_base):
+             sage: f = max_symbolic(sin(x), cos(x))
+             sage: r = integral(f, x, 0, 1)
+             ...
+-            sage: r
++            sage: r             # not tested -- broken with giac 1.7.0
+             sqrt(2) - cos(1)
+-            sage: r.n()
++            sage: r.n()         # not tested -- broken with giac 1.7.0
+             0.873911256504955
+         """
+         return max_symbolic(args)
diff --git a/srcpkgs/sagemath/patches/trac-29631-7072119d27d091b3894860547673c2f6b224f61a.patch b/srcpkgs/sagemath/patches/trac-29631-7072119d27d091b3894860547673c2f6b224f61a.patch
new file mode 100644
index 000000000000..8154c2453c15
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-29631-7072119d27d091b3894860547673c2f6b224f61a.patch
@@ -0,0 +1,31 @@
+From 7072119d27d091b3894860547673c2f6b224f61a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 12 Nov 2021 10:07:44 -0500
+Subject: Trac #29631: new spkg-configure.m4 for linbox.
+
+This is essentially the file posted as an attachment on Trac 29631 by
+Thierry Thomas. I've chosen to leave the lower bound at the latest
+v1.6.3, since in the intervening months most distributions appear to
+have updated.
+---
+ build/pkgs/linbox/spkg-configure.m4 | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+ create mode 100644 build/pkgs/linbox/spkg-configure.m4
+
+diff --git a/build/pkgs/linbox/spkg-configure.m4 b/build/pkgs/linbox/spkg-configure.m4
+new file mode 100644
+index 00000000..fbf405c
+--- /dev/null
++++ b/build/pkgs/linbox/spkg-configure.m4
+@@ -0,0 +1,8 @@
++SAGE_SPKG_CONFIGURE([linbox], [
++  SAGE_SPKG_DEPCHECK([fflas-ffpack flint fplll givaro gmp iml m4ri m4rie mpfr ntl], [
++    PKG_CHECK_MODULES([LINBOX],
++                      [linbox >= 1.6.3],
++                      [],
++                      [sage_spkg_install_linbox=yes])
++  ])
++])
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/f5f7a86908daf60b25e66e6a189c51ada7e0a732.patch b/srcpkgs/sagemath/patches/trac-32797-f5f7a86908daf60b25e66e6a189c51ada7e0a732.patch
similarity index 100%
rename from srcpkgs/sagemath/patches/f5f7a86908daf60b25e66e6a189c51ada7e0a732.patch
rename to srcpkgs/sagemath/patches/trac-32797-f5f7a86908daf60b25e66e6a189c51ada7e0a732.patch
diff --git a/srcpkgs/sagemath/patches/17e308fd9d56d022ed28592f93f07ec8dce530ef.patch b/srcpkgs/sagemath/patches/trac-32880-17e308fd9d56d022ed28592f93f07ec8dce530ef.patch
similarity index 100%
rename from srcpkgs/sagemath/patches/17e308fd9d56d022ed28592f93f07ec8dce530ef.patch
rename to srcpkgs/sagemath/patches/trac-32880-17e308fd9d56d022ed28592f93f07ec8dce530ef.patch
diff --git a/srcpkgs/sagemath/patches/89b8754ad30c6a1bd1fdbd6d62011055bf13b24a.patch b/srcpkgs/sagemath/patches/trac-32892-89b8754ad30c6a1bd1fdbd6d62011055bf13b24a.patch
similarity index 100%
rename from srcpkgs/sagemath/patches/89b8754ad30c6a1bd1fdbd6d62011055bf13b24a.patch
rename to srcpkgs/sagemath/patches/trac-32892-89b8754ad30c6a1bd1fdbd6d62011055bf13b24a.patch
diff --git a/srcpkgs/sagemath/patches/2ee7b99e0270f80cf03b80418372f45274f46051.patch b/srcpkgs/sagemath/patches/trac-32905-2ee7b99e0270f80cf03b80418372f45274f46051.patch
similarity index 100%
rename from srcpkgs/sagemath/patches/2ee7b99e0270f80cf03b80418372f45274f46051.patch
rename to srcpkgs/sagemath/patches/trac-32905-2ee7b99e0270f80cf03b80418372f45274f46051.patch
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 622ee06d85b8..1ab0e9f7d65c 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -56,6 +56,10 @@ do_clean() {
 	rm -rf $wrksrc $_SAGE_ROOT
 }
 
+pre_configure() {
+	./bootstrap
+}
+
 # DISABLED pytest since it brings more harm than good
 # it seems currently all it does is to look for files matching
 # *_test.py and run pytest on those, but I don't think these are meant
@@ -79,8 +83,12 @@ do_install() {
 }
 
 do_check() {
+	TEST=--all
+	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
+		TEST="$(grep -v "^#" ${XBPS_DISTDIR}/sagemath-check)"
+	fi
 	# since make check will build the docs, run test like this instead
-	./sage -tp ${XBPS_MAKEJOBS} --all
+	./sage -tp ${XBPS_MAKEJOBS} ${TEST}
 }
 
 ### copied from sage-deps, to be kept in sync

From 0ebf452243fe2ca7aaf00b00aff7d161b4659264 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sun, 28 Nov 2021 00:32:26 -0300
Subject: [PATCH 09/19] sagemath: use system maxima

Also: add patch to use relative symlinks in gap where absolute symlinks
are now used -- otherwise xbps-create gets confused
---
 ...-spkg-install-make-symlinks-relative.patch |  27 +++
 .../patches/trac-32867-system-maxima.patch    | 174 ++++++++++++++++++
 srcpkgs/sagemath/template                     |   4 +-
 3 files changed, 204 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/sagemath/patches/0001-build-pkgs-gap-spkg-install-make-symlinks-relative.patch
 create mode 100644 srcpkgs/sagemath/patches/trac-32867-system-maxima.patch

diff --git a/srcpkgs/sagemath/patches/0001-build-pkgs-gap-spkg-install-make-symlinks-relative.patch b/srcpkgs/sagemath/patches/0001-build-pkgs-gap-spkg-install-make-symlinks-relative.patch
new file mode 100644
index 000000000000..c9feb870f2be
--- /dev/null
+++ b/srcpkgs/sagemath/patches/0001-build-pkgs-gap-spkg-install-make-symlinks-relative.patch
@@ -0,0 +1,27 @@
+From 521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Sun, 28 Nov 2021 18:57:34 -0300
+Subject: [PATCH] build/pkgs/gap/spkg-install: make symlinks relative
+
+---
+ build/pkgs/gap/spkg-install.in | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/build/pkgs/gap/spkg-install.in b/build/pkgs/gap/spkg-install.in
+index 32d1fb982c..2ceadf99db 100644
+--- a/build/pkgs/gap/spkg-install.in
++++ b/build/pkgs/gap/spkg-install.in
+@@ -80,8 +80,8 @@ chmod +x "$SAGE_DESTDIR$SAGE_BIN/gap"
+ 
+ # Create symlinks under $GAP_ROOT for these executables, as they are expected
+ # (especially when building kernel packages) to exist
+-ln -sf "$SAGE_BIN/gap-bin" "$DESTDIR_GAP_ROOT/gap"
+-ln -sf "$SAGE_BIN/gac" "$DESTDIR_GAP_ROOT/gac"
++ln -sf "../../bin/gap-bin" "$DESTDIR_GAP_ROOT/gap"
++ln -sf "../../bin/gac" "$DESTDIR_GAP_ROOT/gac"
+ 
+ # Fix the $GAP_ROOT/bin/<arch>/src symlink to be relative (otherwise it links
+ # to the actual path of the sources GAP was compiled from)
+-- 
+2.34.1
+
diff --git a/srcpkgs/sagemath/patches/trac-32867-system-maxima.patch b/srcpkgs/sagemath/patches/trac-32867-system-maxima.patch
new file mode 100644
index 000000000000..cb6517a388d8
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-32867-system-maxima.patch
@@ -0,0 +1,174 @@
+diff --git a/build/pkgs/ecl/spkg-configure.m4 b/build/pkgs/ecl/spkg-configure.m4
+index ae1e0ac5e1..7dbcfa6377 100644
+--- a/build/pkgs/ecl/spkg-configure.m4
++++ b/build/pkgs/ecl/spkg-configure.m4
+@@ -35,10 +35,7 @@ SAGE_SPKG_CONFIGURE([ecl], [
+     AC_SUBST(SAGE_ECL_CONFIG, [$ECL_CONFIG])
+   fi
+ 
+-  # Maxima cannot yet be provided by the system, so we always use
++  # Kenzo cannot yet be provided by the system, so we always use
+   # the SAGE_LOCAL path for now.
+-  AC_SUBST(SAGE_MAXIMA_FAS, ['${prefix}'/lib/ecl/maxima.fas])
+-
+-  # Likewise for the optional Kenzo SPKG
+   AC_SUBST(SAGE_KENZO_FAS, ['${prefix}'/lib/ecl/kenzo.fas])
+ ])
+diff --git a/build/pkgs/maxima/spkg-configure.m4 b/build/pkgs/maxima/spkg-configure.m4
+new file mode 100644
+index 0000000000..df625fecc4
+--- /dev/null
++++ b/build/pkgs/maxima/spkg-configure.m4
+@@ -0,0 +1,35 @@
++SAGE_SPKG_CONFIGURE([maxima], [
++  SAGE_SPKG_DEPCHECK([ecl], [
++    dnl First check for the "maxima" executable in the user's PATH, because
++    dnl we still use pexpect to communicate with it in a few places. We pass
++    dnl the "-l ecl" flag here to ensure that the standalone executable also
++    dnl supports ECL.
++    AC_MSG_CHECKING(if "maxima -l ecl" works)
++    AS_IF([! maxima -l ecl -q -r 'quit();' \
++             >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD], [
++      AC_MSG_RESULT(no)
++      sage_spkg_install_maxima=yes
++    ], [
++      AC_MSG_RESULT(yes)
++      dnl If we have the executable, check also for the ECL library.
++      AC_MSG_CHECKING([if ECL can "require" the maxima module])
++      AS_IF([ecl --eval "(require 'maxima)" --eval "(quit)" \
++               >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD], [
++        AC_MSG_RESULT(yes)
++      ], [
++	AC_MSG_RESULT(no)
++	sage_spkg_install_maxima=yes
++      ])
++    ])
++  ])
++],[],[],[
++  # post-check
++  AS_IF([test x$sage_spkg_install_maxima = xyes], [
++    dnl Leaving this variable empty will tell sagelib to load
++    dnl the maxima library (within ECL) by name instead of by
++    dnl absolute path.
++    SAGE_MAXIMA_FAS='${prefix}'/lib/ecl/maxima.fas
++  ])
++  AC_SUBST(SAGE_MAXIMA_FAS, "${SAGE_MAXIMA_FAS}")
++])
++
+diff --git a/pkgs/sage-conf/sage_conf.py.in b/pkgs/sage-conf/sage_conf.py.in
+index fbce6947de..8cda3ebfac 100644
+--- a/pkgs/sage-conf/sage_conf.py.in
++++ b/pkgs/sage-conf/sage_conf.py.in
+@@ -9,9 +9,8 @@ VERSION = "@PACKAGE_VERSION@"
+ SAGE_LOCAL = "@prefix@"
+ SAGE_ROOT = "@SAGE_ROOT@"
+ 
+-MAXIMA = "@prefix@/bin/maxima"
+-
+-# Delete this line if your ECL can load maxima without further prodding.
++# Set this to the empty string if your ECL can load maxima without
++# further prodding.
+ MAXIMA_FAS = "@SAGE_MAXIMA_FAS@".replace('${prefix}', SAGE_LOCAL)
+ 
+ # Delete this line if your ECL can load Kenzo without further prodding.
+diff --git a/src/bin/sage b/src/bin/sage
+index fcd263029d..54b69a1043 100755
+--- a/src/bin/sage
++++ b/src/bin/sage
+@@ -684,11 +684,7 @@ fi
+ 
+ if [ "$1" = '-maxima' -o "$1" = '--maxima' ]; then
+     shift
+-    maxima_cmd=$(sage-config MAXIMA 2>/dev/null)
+-    if [ -z "${maxima_cmd}" ]; then
+-        maxima_cmd="maxima -l ecl"
+-    fi
+-    exec $maxima_cmd "$@"
++    exec maxima -l ecl "$@"
+ fi
+ 
+ if [ "$1" = '-mwrank' -o "$1" = '--mwrank' ]; then
+diff --git a/src/bin/sage-env b/src/bin/sage-env
+index a0426df523..f0866b4b1b 100644
+--- a/src/bin/sage-env
++++ b/src/bin/sage-env
+@@ -482,9 +482,6 @@ if [ -d "$DOT_SAGE" ] ; then
+     fi
+ fi
+ 
+-if [ -n "$SAGE_LOCAL" ]; then
+-    export MAXIMA_PREFIX="$SAGE_LOCAL"
+-fi
+ export MAXIMA_USERDIR="$DOT_SAGE/maxima"
+ 
+ if [ -n "$SAGE_LOCAL" ]; then
+diff --git a/src/sage/env.py b/src/sage/env.py
+index 40ace135f0..95edc16081 100644
+--- a/src/sage/env.py
++++ b/src/sage/env.py
+@@ -207,7 +207,6 @@ MATHJAX_DIR = var("MATHJAX_DIR", join(SAGE_SHARE, "mathjax"))
+ MTXLIB = var("MTXLIB", join(SAGE_SHARE, "meataxe"))
+ THREEJS_DIR = var("THREEJS_DIR", join(SAGE_SHARE, "threejs-sage"))
+ PPLPY_DOCS = var("PPLPY_DOCS", join(SAGE_SHARE, "doc", "pplpy"))
+-MAXIMA = var("MAXIMA", "maxima")
+ MAXIMA_FAS = var("MAXIMA_FAS")
+ KENZO_FAS = var("KENZO_FAS")
+ SAGE_NAUTY_BINS_PREFIX = var("SAGE_NAUTY_BINS_PREFIX", "")
+diff --git a/src/sage/interfaces/maxima.py b/src/sage/interfaces/maxima.py
+index fc7f48bc05..7313c7d0d3 100644
+--- a/src/sage/interfaces/maxima.py
++++ b/src/sage/interfaces/maxima.py
+@@ -484,7 +484,6 @@ import shlex
+ 
+ from random import randrange
+ 
+-from sage.env import MAXIMA
+ from sage.misc.misc import ECL_TMP
+ 
+ from .expect import (Expect, ExpectElement, gc_disabled)
+@@ -558,7 +557,7 @@ class Maxima(MaximaAbstract, Expect):
+         Expect.__init__(self,
+                         name = 'maxima',
+                         prompt = r'\(\%i[0-9]+\) ',
+-                        command = '{0} -p {1}'.format(MAXIMA, shlex.quote(STARTUP)),
++                        command = 'maxima -l ecl -p {0}'.format(shlex.quote(STARTUP)),
+                         env = {'TMPDIR': str(ECL_TMP)},
+                         script_subdirectory = script_subdirectory,
+                         restart_on_ctrlc = False,
+diff --git a/src/sage/interfaces/maxima_abstract.py b/src/sage/interfaces/maxima_abstract.py
+index 917059de0a..c966a3c9a0 100644
+--- a/src/sage/interfaces/maxima_abstract.py
++++ b/src/sage/interfaces/maxima_abstract.py
+@@ -54,7 +54,7 @@ import re
+ import sys
+ import subprocess
+ 
+-from sage.env import DOT_SAGE, MAXIMA
++from sage.env import DOT_SAGE
+ COMMANDS_CACHE = '%s/maxima_commandlist_cache.sobj' % DOT_SAGE
+ 
+ from sage.cpython.string import bytes_to_str
+@@ -164,7 +164,7 @@ class MaximaAbstract(ExtraTabCompletion, Interface):
+             -- Function: gcd (<p_1>, <p_2>, <x_1>, ...)
+             ...
+         """
+-        cmd = '{} --very-quiet --batch-string="{}({});" '.format(MAXIMA, command, s)
++        cmd = 'maxima -l ecl --very-quiet --batch-string="{}({});" '.format(command, s)
+         env = os.environ.copy()
+         env['TMPDIR'] = str(ECL_TMP)
+ 
+@@ -2214,7 +2214,7 @@ def maxima_version():
+         sage: maxima_version()  # random
+         '5.41.0'
+     """
+-    with os.popen('{} --version'.format(MAXIMA)) as p:
++    with os.popen('maxima -l ecl --version') as p:
+         return p.read().split()[-1]
+ 
+ 
+@@ -2232,4 +2232,4 @@ def maxima_console():
+     from sage.repl.rich_output.display_manager import get_display_manager
+     if not get_display_manager().is_in_terminal():
+         raise RuntimeError('Can use the console only in the terminal. Try %%maxima magics instead.')
+-    os.system('{}'.format(MAXIMA))
++    os.system('maxima -l ecl')
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 1ab0e9f7d65c..7917e78cbdc6 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -11,7 +11,8 @@ make_build_target=build
 depends="giac git FlintQS zn_poly sympow
  pari-elldata-small pari-galdata pari-galpol-small pari-seadata-small
  flintlib-devel gsl-devel ntl-devel eclib-devel pari-devel mpfr-devel
- m4ri-devel gd-devel libpng-devel fflas-ffpack pkg-config gcc-fortran"
+ m4ri-devel gd-devel libpng-devel fflas-ffpack pkg-config gcc-fortran
+ maxima-ecl"
 short_desc="Open source mathematics software"
 maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-or-later"
@@ -124,6 +125,7 @@ makedepends+="
  gengetopt texinfo
  brial-devel cliquer-devel gfan libbraiding-devel libhomfly-devel
  lrcalc-devel nauty-devel palp tachyon
+ maxima-ecl
 "
 
 # TODO: optional

From 5381ff7af534420963c713312fcaa29f582ffd77 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Thu, 11 Nov 2021 09:39:20 -0300
Subject: [PATCH 10/19] hooks: option to skip 03-rewrite-python-shebang

---
 common/hooks/pre-pkg/03-rewrite-python-shebang.sh | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/common/hooks/pre-pkg/03-rewrite-python-shebang.sh b/common/hooks/pre-pkg/03-rewrite-python-shebang.sh
index 07162ad2c69b..c0f2198e44cf 100644
--- a/common/hooks/pre-pkg/03-rewrite-python-shebang.sh
+++ b/common/hooks/pre-pkg/03-rewrite-python-shebang.sh
@@ -4,6 +4,10 @@
 hook() {
 	local pyver= shebang= off=
 
+	if [ -n "$_no_python_shebang" ]; then
+		return 0
+	fi
+
 	if [ -d ${PKGDESTDIR}/usr/lib/python* ]; then
 		pyver="$(find ${PKGDESTDIR}/usr/lib/python* -prune -type d | grep -o '[[:digit:]]\.[[:digit:]]\+$')"
 	fi

From d4f9b074b8a3a8f9389ec14db6b0a15bd38f4cd5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 4 Dec 2021 12:25:56 -0300
Subject: [PATCH 11/19] sagemath: don't rewrite python shebangs

This is still causing some issues, even if main sage and doctest works
ok with rewrite enabled, some scripts are broken as reported in the PR.

This is still a temporary workaround as we are hoping for system
python-3.10 support at some point.

Also in this commit: add some depends
---
 srcpkgs/sagemath/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 7917e78cbdc6..ede79e76b98d 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -12,7 +12,8 @@ depends="giac git FlintQS zn_poly sympow
  pari-elldata-small pari-galdata pari-galpol-small pari-seadata-small
  flintlib-devel gsl-devel ntl-devel eclib-devel pari-devel mpfr-devel
  m4ri-devel gd-devel libpng-devel fflas-ffpack pkg-config gcc-fortran
- maxima-ecl"
+ linbox-devel gfan nauty-devel palp tachyon maxima-ecl
+ "
 short_desc="Open source mathematics software"
 maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-or-later"
@@ -43,8 +44,7 @@ nostrip=yes
 noshlibprovides=yes
 
 # don't rewrite python shebang as sage uses its own python (for now)
-# after python_version=3, this seems harmless... strange...
-#_no_python_shebang=yes
+_no_python_shebang=yes
 
 post_extract() {
 	# sage wants to be built in place so let $wrksrc be a symlink

From e1b47e69f67f591f67d0fde04c885de26c07aecd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Thu, 9 Dec 2021 22:31:15 -0300
Subject: [PATCH 12/19] sagemath: change patch for cmdline args to disable
 dochtml testing

---
 .../sagemath/patches/skip-optional-dochtml.patch    | 13 -------------
 srcpkgs/sagemath/template                           |  4 +++-
 2 files changed, 3 insertions(+), 14 deletions(-)
 delete mode 100644 srcpkgs/sagemath/patches/skip-optional-dochtml.patch

diff --git a/srcpkgs/sagemath/patches/skip-optional-dochtml.patch b/srcpkgs/sagemath/patches/skip-optional-dochtml.patch
deleted file mode 100644
index e49b18a52fbc..000000000000
--- a/srcpkgs/sagemath/patches/skip-optional-dochtml.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/src/bin/sage-runtests b/src/bin/sage-runtests
-index 288c889bd1..b9a4d3038a 100755
---- a/src/bin/sage-runtests
-+++ b/src/bin/sage-runtests
-@@ -15,7 +15,7 @@ os.environ['SAGE_STARTUP_FILE'] = os.path.join(DOT_SAGE, 'init-doctests.sage')
- 
- def _get_optional_defaults():
-     """Return the default value for the --optional flag."""
--    optional = ['sage', 'dochtml', 'optional']
-+    optional = ['sage', 'optional']
- 
-     # This should be good-enough to determine if we are in a sage source
-     # repository working tree
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index ede79e76b98d..b009060232c0 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -88,8 +88,10 @@ do_check() {
 	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
 		TEST="$(grep -v "^#" ${XBPS_DISTDIR}/sagemath-check)"
 	fi
+	# the default is "sage,dochtml,optional,build", we skip dochtml
+	OPT="--optional sage,optional,build"
 	# since make check will build the docs, run test like this instead
-	./sage -tp ${XBPS_MAKEJOBS} ${TEST}
+	./sage -tp ${XBPS_MAKEJOBS} ${OPT} ${TEST}
 }
 
 ### copied from sage-deps, to be kept in sync

From 62169c102288e404104653b2839add023c83ce6d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 13 Dec 2021 00:05:49 -0300
Subject: [PATCH 13/19] sagemath: update to 9.5.beta8.

---
 ...a86908daf60b25e66e6a189c51ada7e0a732.patch |  25 ----
 .../patches/trac-32828-fix-pyzmq.patch        | 134 ------------------
 ...754ad30c6a1bd1fdbd6d62011055bf13b24a.patch |  27 ----
 srcpkgs/sagemath/template                     |   6 +-
 4 files changed, 3 insertions(+), 189 deletions(-)
 delete mode 100644 srcpkgs/sagemath/patches/trac-32797-f5f7a86908daf60b25e66e6a189c51ada7e0a732.patch
 delete mode 100644 srcpkgs/sagemath/patches/trac-32828-fix-pyzmq.patch
 delete mode 100644 srcpkgs/sagemath/patches/trac-32892-89b8754ad30c6a1bd1fdbd6d62011055bf13b24a.patch

diff --git a/srcpkgs/sagemath/patches/trac-32797-f5f7a86908daf60b25e66e6a189c51ada7e0a732.patch b/srcpkgs/sagemath/patches/trac-32797-f5f7a86908daf60b25e66e6a189c51ada7e0a732.patch
deleted file mode 100644
index ec0467757ee7..000000000000
--- a/srcpkgs/sagemath/patches/trac-32797-f5f7a86908daf60b25e66e6a189c51ada7e0a732.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From f5f7a86908daf60b25e66e6a189c51ada7e0a732 Mon Sep 17 00:00:00 2001
-From: Antonio Rojas <arojas@archlinux.org>
-Date: Sat, 30 Oct 2021 10:21:52 +0200
-Subject: Fix test failure caused by new warning
-
----
- src/sage/lfunctions/pari.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/sage/lfunctions/pari.py b/src/sage/lfunctions/pari.py
-index 0aaf91c..33d5266 100644
---- a/src/sage/lfunctions/pari.py
-+++ b/src/sage/lfunctions/pari.py
-@@ -316,7 +316,7 @@ def lfun_number_field(K):
-         sage: L(3)
-         1.15202784126080
-         sage: L(0)
--        0.000000000000000
-+        ...0.000000000000000
-     """
-     return pari.lfuncreate(K)
- 
--- 
-cgit v1.0-1-gd88e
-
diff --git a/srcpkgs/sagemath/patches/trac-32828-fix-pyzmq.patch b/srcpkgs/sagemath/patches/trac-32828-fix-pyzmq.patch
deleted file mode 100644
index 426932c95c9b..000000000000
--- a/srcpkgs/sagemath/patches/trac-32828-fix-pyzmq.patch
+++ /dev/null
@@ -1,134 +0,0 @@
-diff --git a/build/pkgs/pyzmq/checksums.ini b/build/pkgs/pyzmq/checksums.ini
-index 3824fd2ce9..20509db618 100644
---- a/build/pkgs/pyzmq/checksums.ini
-+++ b/build/pkgs/pyzmq/checksums.ini
-@@ -1,5 +1,5 @@
- tarball=pyzmq-VERSION.tar.gz
--sha1=50abf6482a6395f15dce0b2774021e12c9f4faad
--md5=f261acf884460e93d30f7113c8e9242e
--cksum=1661206741
-+sha1=d8bb8cb345c0bfd9e67a95ac796bf4b10354dde6
-+md5=ecf13c72fbea05ba5ddc771295409d48
-+cksum=1680251717
- upstream_url=https://pypi.io/packages/source/p/pyzmq/pyzmq-VERSION.tar.gz
-diff --git a/build/pkgs/pyzmq/package-version.txt b/build/pkgs/pyzmq/package-version.txt
-index 0398faf11c..8326e27f9b 100644
---- a/build/pkgs/pyzmq/package-version.txt
-+++ b/build/pkgs/pyzmq/package-version.txt
-@@ -1 +1 @@
--22.2.1
-+22.3.0
-diff --git a/build/pkgs/pyzmq/spkg-install.in b/build/pkgs/pyzmq/spkg-install.in
-index 0ce404ee5a..069d87767f 100644
---- a/build/pkgs/pyzmq/spkg-install.in
-+++ b/build/pkgs/pyzmq/spkg-install.in
-@@ -1,17 +1,11 @@
--# Since we use environment vars we have to generate setup.cfg
--
--echo "[build_ext]" > src/setup.cfg
--
--# (I tried putting quotes around $SAGE_LOCAL to allow for spaces in
--# the path---which is never used but is a good habit to support---but
--# that simply does not work. Sorry.)
--
--echo "library_dirs = $SAGE_LOCAL/lib/" >> src/setup.cfg
--echo "include_dirs = $SAGE_LOCAL/include/" >> src/setup.cfg
--
--echo "[configure]" >> src/setup.cfg
--
- cd src
- 
-+# Generate setup.cfg
-+cat > setup.cfg <<EOF
-+[global]
-+zmq_prefix = $SAGE_LOCAL
-+no_libzmq_extension = True
-+EOF
-+
- # Configure and install
- sdh_pip_install .
-diff --git a/build/pkgs/setuptools/checksums.ini b/build/pkgs/setuptools/checksums.ini
-index 6a280871e7..d9290d04ff 100644
---- a/build/pkgs/setuptools/checksums.ini
-+++ b/build/pkgs/setuptools/checksums.ini
-@@ -1,5 +1,5 @@
- tarball=setuptools-VERSION.tar.gz
--sha1=5d97de0e774b2269c85685a4aa8fd5956bcfd2bb
--md5=ff20ab7e0d51c5ad0a9438c50e598c06
--cksum=3564252314
-+sha1=cd4e5d1f7c47f86354fc89d040d869cde244da3b
-+md5=79b36f59270a6f2e45d6a9a0c6dc68c1
-+cksum=430889097
- upstream_url=https://pypi.io/packages/source/s/setuptools/setuptools-VERSION.tar.gz
-diff --git a/build/pkgs/setuptools/package-version.txt b/build/pkgs/setuptools/package-version.txt
-index e6ea636051..aec1257e4c 100644
---- a/build/pkgs/setuptools/package-version.txt
-+++ b/build/pkgs/setuptools/package-version.txt
-@@ -1 +1 @@
--58.2.0
-+59.2.0
-diff --git a/build/pkgs/zeromq/checksums.ini b/build/pkgs/zeromq/checksums.ini
-index ea8c36bce5..dc802612dd 100644
---- a/build/pkgs/zeromq/checksums.ini
-+++ b/build/pkgs/zeromq/checksums.ini
-@@ -1,4 +1,5 @@
- tarball=zeromq-VERSION.tar.gz
--sha1=1132f839d703486c4ee1cf22f056585dfbb329c2
--md5=a1c95b34384257e986842f4d006957b8
--cksum=136261411
-+sha1=47277a64749049123d1401600e8cfbab10a3ae28
-+md5=c897d4005a3f0b8276b00b7921412379
-+cksum=1500782345
-+upstream_url=https://github.com/zeromq/libzmq/releases/download/vVERSION/zeromq-VERSION.tar.gz
-diff --git a/build/pkgs/zeromq/package-version.txt b/build/pkgs/zeromq/package-version.txt
-index df0228dfae..eda862a98c 100644
---- a/build/pkgs/zeromq/package-version.txt
-+++ b/build/pkgs/zeromq/package-version.txt
-@@ -1 +1 @@
--4.2.5
-+4.3.4
-diff --git a/build/pkgs/zeromq/patches/getrandom.patch b/build/pkgs/zeromq/patches/getrandom.patch
-deleted file mode 100644
-index e665114e1c..0000000000
---- a/build/pkgs/zeromq/patches/getrandom.patch
-+++ /dev/null
-@@ -1,39 +0,0 @@
--Patch taken from upstream git repo
--and after running aclocal && autoconf
--and removing changes to autotools input files
--
--commit 4ff814f204ee38177a392526cf12c8c0019b480f
--Author: Luca Boccassi <luca.boccassi@gmail.com>
--Date:   Wed May 9 10:41:20 2018 +0100
--
--    Problem: getrandom test does not check if it's working
--
--    Solution: check return value in autoconf and CMake. On some platforms
--    the function is available but not implemented (eg: GNU/Hurd).
--
--diff -ru zeromq-4.2.5//builds/cmake/Modules/ZMQSourceRunChecks.cmake b/builds/cmake/Modules/ZMQSourceRunChecks.cmake
----- zeromq-4.2.5//builds/cmake/Modules/ZMQSourceRunChecks.cmake	2018-03-23 20:33:36.000000000 +0100
--+++ b/builds/cmake/Modules/ZMQSourceRunChecks.cmake	2018-07-24 12:39:23.340035053 +0200
--@@ -287,7 +287,8 @@
-- int main (int argc, char *argv [])
-- {
--     char buf[4];
---    getrandom(buf, 4, 0);
--+    int rc = getrandom(buf, 4, 0);
--+    return rc == -1 ? 1 : 0;
-- }
-- "
--     ZMQ_HAVE_GETRANDOM)
--diff -ru zeromq-4.2.5//configure b/configure
----- zeromq-4.2.5//configure	2018-03-23 20:34:18.000000000 +0100
--+++ b/configure	2018-07-24 12:39:49.018035120 +0200
--@@ -23315,7 +23315,8 @@
-- int main (int argc, char *argv [])
-- {
--     char buf[4];
---    getrandom(buf, 4, 0);
--+    int rc = getrandom(buf, 4, 0);
--+    return rc == -1 ? 1 : 0;
-- }
-- 
-- _ACEOF
diff --git a/srcpkgs/sagemath/patches/trac-32892-89b8754ad30c6a1bd1fdbd6d62011055bf13b24a.patch b/srcpkgs/sagemath/patches/trac-32892-89b8754ad30c6a1bd1fdbd6d62011055bf13b24a.patch
deleted file mode 100644
index ea05b2b6a524..000000000000
--- a/srcpkgs/sagemath/patches/trac-32892-89b8754ad30c6a1bd1fdbd6d62011055bf13b24a.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 89b8754ad30c6a1bd1fdbd6d62011055bf13b24a Mon Sep 17 00:00:00 2001
-From: Tobias Diez <code@tobiasdiez.com>
-Date: Wed, 17 Nov 2021 22:24:32 +0100
-Subject: Fix exit code for pytest in case of no matched files
-
----
- src/bin/sage-runtests | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/src/bin/sage-runtests b/src/bin/sage-runtests
-index 882456d..8b362ca 100755
---- a/src/bin/sage-runtests
-+++ b/src/bin/sage-runtests
-@@ -157,6 +157,10 @@ if __name__ == "__main__":
-         if args.verbose:
-             pytest_options.append("-v")
-         exit_code_pytest = pytest.main(pytest_options + args.filenames)
-+        if exit_code_pytest == 5:
-+            # Exit code 5 means there were no test files, pass in this case
-+            exit_code_pytest = 0
-+
-     except ModuleNotFoundError:
-         print("Pytest is not installed, skip checking tests that rely on it.")
- 
--- 
-cgit v1.0-1-gd88e
-
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index b009060232c0..a1f08000669a 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -1,6 +1,6 @@
 # Template file for 'sagemath'
 pkgname=sagemath
-version=9.5.beta7
+version=9.5.beta8
 revision=1
 wrksrc=sage-$version
 build_style=configure
@@ -19,7 +19,7 @@ maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-or-later"
 homepage="http://sagemath.org/"
 distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
-checksum=b81e1fe22d1b990bf1230260241ead016470da1f2f7b260f562d50f74c2904c7
+checksum=124f3d23ce6442ecc84ed98e3c035e0d00c8261c3125712e4742c32e731d13de
 python_version=3
 
 # path where sage will be installed
@@ -112,7 +112,7 @@ makedepends+=" cmake curl git ninja pandoc patch pkg-config python3 tox"
 makedepends+="
  CoinMP-devel R arb-devel boost-devel bzip2-devel ecl eclib-devel
  ecm-devel flintlib-devel freetype-devel gc-devel gd-devel giac-devel
- glpk-devel gmp-devel gmpxx-devel gp2c graphviz gsl-devel isl-devel
+ glpk-devel gmp-devel gmpxx-devel gp2c graphviz-devel gsl-devel isl-devel
  libatomic_ops-devel libcurl-devel libffi-devel libmpc-devel
  libpng-devel libxml2-devel mpfr-devel ncurses-devel openblas-devel
  pari-devel pari-elldata-small pari-galdata pari-galpol-small

From 26fe80d9163039137f37e2bf37dc88016cbdef63 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sun, 19 Dec 2021 10:42:01 -0300
Subject: [PATCH 14/19] sagemath: more changes

 - cleanup and rename some patches
 - make symlink relative so it works ok outside the chroot
 - add graphviz to depends (not implied by graphviz-devel)
 - add primecount and primesieve to depends
---
 ...3e88ee188d516e4956832a23f985a73917a.patch} |   2 +-
 ...ea979d4bfa1a26ef3b08a29ca626b83b6ff5.patch |  23 ++
 ...ba734cb4ded0b04165fa142b5cf4c38fd23.patch} | 233 ++++++++++++------
 srcpkgs/sagemath/template                     |   8 +-
 4 files changed, 181 insertions(+), 85 deletions(-)
 rename srcpkgs/sagemath/patches/{trac-29631-7072119d27d091b3894860547673c2f6b224f61a.patch => trac-29631-001-system_linbox-794713e88ee188d516e4956832a23f985a73917a.patch} (94%)
 create mode 100644 srcpkgs/sagemath/patches/trac-29631-002-system_linbox-7e16ea979d4bfa1a26ef3b08a29ca626b83b6ff5.patch
 rename srcpkgs/sagemath/patches/{trac-32867-system-maxima.patch => trac-32867-system_maxima-ed39aba734cb4ded0b04165fa142b5cf4c38fd23.patch} (66%)

diff --git a/srcpkgs/sagemath/patches/trac-29631-7072119d27d091b3894860547673c2f6b224f61a.patch b/srcpkgs/sagemath/patches/trac-29631-001-system_linbox-794713e88ee188d516e4956832a23f985a73917a.patch
similarity index 94%
rename from srcpkgs/sagemath/patches/trac-29631-7072119d27d091b3894860547673c2f6b224f61a.patch
rename to srcpkgs/sagemath/patches/trac-29631-001-system_linbox-794713e88ee188d516e4956832a23f985a73917a.patch
index 8154c2453c15..483dbe2c2597 100644
--- a/srcpkgs/sagemath/patches/trac-29631-7072119d27d091b3894860547673c2f6b224f61a.patch
+++ b/srcpkgs/sagemath/patches/trac-29631-001-system_linbox-794713e88ee188d516e4956832a23f985a73917a.patch
@@ -1,4 +1,4 @@
-From 7072119d27d091b3894860547673c2f6b224f61a Mon Sep 17 00:00:00 2001
+From 794713e88ee188d516e4956832a23f985a73917a Mon Sep 17 00:00:00 2001
 From: Michael Orlitzky <michael@orlitzky.com>
 Date: Fri, 12 Nov 2021 10:07:44 -0500
 Subject: Trac #29631: new spkg-configure.m4 for linbox.
diff --git a/srcpkgs/sagemath/patches/trac-29631-002-system_linbox-7e16ea979d4bfa1a26ef3b08a29ca626b83b6ff5.patch b/srcpkgs/sagemath/patches/trac-29631-002-system_linbox-7e16ea979d4bfa1a26ef3b08a29ca626b83b6ff5.patch
new file mode 100644
index 000000000000..3b20d13100e7
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-29631-002-system_linbox-7e16ea979d4bfa1a26ef3b08a29ca626b83b6ff5.patch
@@ -0,0 +1,23 @@
+From 7e16ea979d4bfa1a26ef3b08a29ca626b83b6ff5 Mon Sep 17 00:00:00 2001
+From: Dima Pasechnik <dima@pasechnik.info>
+Date: Sun, 5 Dec 2021 10:59:34 +0000
+Subject: correct the package name: `-`->`_`
+
+---
+ build/pkgs/linbox/spkg-configure.m4 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/build/pkgs/linbox/spkg-configure.m4 b/build/pkgs/linbox/spkg-configure.m4
+index fbf405c..f54b210 100644
+--- a/build/pkgs/linbox/spkg-configure.m4
++++ b/build/pkgs/linbox/spkg-configure.m4
+@@ -1,5 +1,5 @@
+ SAGE_SPKG_CONFIGURE([linbox], [
+-  SAGE_SPKG_DEPCHECK([fflas-ffpack flint fplll givaro gmp iml m4ri m4rie mpfr ntl], [
++  SAGE_SPKG_DEPCHECK([fflas_ffpack flint fplll givaro gmp iml m4ri m4rie mpfr ntl], [
+     PKG_CHECK_MODULES([LINBOX],
+                       [linbox >= 1.6.3],
+                       [],
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/trac-32867-system-maxima.patch b/srcpkgs/sagemath/patches/trac-32867-system_maxima-ed39aba734cb4ded0b04165fa142b5cf4c38fd23.patch
similarity index 66%
rename from srcpkgs/sagemath/patches/trac-32867-system-maxima.patch
rename to srcpkgs/sagemath/patches/trac-32867-system_maxima-ed39aba734cb4ded0b04165fa142b5cf4c38fd23.patch
index cb6517a388d8..8edbde0ce76f 100644
--- a/srcpkgs/sagemath/patches/trac-32867-system-maxima.patch
+++ b/srcpkgs/sagemath/patches/trac-32867-system_maxima-ed39aba734cb4ded0b04165fa142b5cf4c38fd23.patch
@@ -1,78 +1,66 @@
-diff --git a/build/pkgs/ecl/spkg-configure.m4 b/build/pkgs/ecl/spkg-configure.m4
-index ae1e0ac5e1..7dbcfa6377 100644
---- a/build/pkgs/ecl/spkg-configure.m4
-+++ b/build/pkgs/ecl/spkg-configure.m4
-@@ -35,10 +35,7 @@ SAGE_SPKG_CONFIGURE([ecl], [
-     AC_SUBST(SAGE_ECL_CONFIG, [$ECL_CONFIG])
-   fi
+From ab5400040fcf3a1061229afb3ab81f26fef0858d Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 12 Nov 2021 21:33:39 -0500
+Subject: Trac #32867: don't export MAXIMA_PREFIX.
+
+This should work automatically, and the previous behavior is
+incorrect if we intend to use the system copy of maxima.
+---
+ src/bin/sage-env | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/src/bin/sage-env b/src/bin/sage-env
+index a0426df..f0866b4 100644
+--- a/src/bin/sage-env
++++ b/src/bin/sage-env
+@@ -482,9 +482,6 @@ if [ -d "$DOT_SAGE" ] ; then
+     fi
+ fi
  
--  # Maxima cannot yet be provided by the system, so we always use
-+  # Kenzo cannot yet be provided by the system, so we always use
-   # the SAGE_LOCAL path for now.
--  AC_SUBST(SAGE_MAXIMA_FAS, ['${prefix}'/lib/ecl/maxima.fas])
--
--  # Likewise for the optional Kenzo SPKG
-   AC_SUBST(SAGE_KENZO_FAS, ['${prefix}'/lib/ecl/kenzo.fas])
- ])
-diff --git a/build/pkgs/maxima/spkg-configure.m4 b/build/pkgs/maxima/spkg-configure.m4
-new file mode 100644
-index 0000000000..df625fecc4
---- /dev/null
-+++ b/build/pkgs/maxima/spkg-configure.m4
-@@ -0,0 +1,35 @@
-+SAGE_SPKG_CONFIGURE([maxima], [
-+  SAGE_SPKG_DEPCHECK([ecl], [
-+    dnl First check for the "maxima" executable in the user's PATH, because
-+    dnl we still use pexpect to communicate with it in a few places. We pass
-+    dnl the "-l ecl" flag here to ensure that the standalone executable also
-+    dnl supports ECL.
-+    AC_MSG_CHECKING(if "maxima -l ecl" works)
-+    AS_IF([! maxima -l ecl -q -r 'quit();' \
-+             >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD], [
-+      AC_MSG_RESULT(no)
-+      sage_spkg_install_maxima=yes
-+    ], [
-+      AC_MSG_RESULT(yes)
-+      dnl If we have the executable, check also for the ECL library.
-+      AC_MSG_CHECKING([if ECL can "require" the maxima module])
-+      AS_IF([ecl --eval "(require 'maxima)" --eval "(quit)" \
-+               >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD], [
-+        AC_MSG_RESULT(yes)
-+      ], [
-+	AC_MSG_RESULT(no)
-+	sage_spkg_install_maxima=yes
-+      ])
-+    ])
-+  ])
-+],[],[],[
-+  # post-check
-+  AS_IF([test x$sage_spkg_install_maxima = xyes], [
-+    dnl Leaving this variable empty will tell sagelib to load
-+    dnl the maxima library (within ECL) by name instead of by
-+    dnl absolute path.
-+    SAGE_MAXIMA_FAS='${prefix}'/lib/ecl/maxima.fas
-+  ])
-+  AC_SUBST(SAGE_MAXIMA_FAS, "${SAGE_MAXIMA_FAS}")
-+])
-+
+-if [ -n "$SAGE_LOCAL" ]; then
+-    export MAXIMA_PREFIX="$SAGE_LOCAL"
+-fi
+ export MAXIMA_USERDIR="$DOT_SAGE/maxima"
+ 
+ if [ -n "$SAGE_LOCAL" ]; then
+-- 
+cgit v1.0-1-gd88e
+
+
+From 0e29761fbd23736d8d9acd235e4fa2de839df6a4 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 12 Nov 2021 21:13:21 -0500
+Subject: Trac #32867: remove the MAXIMA sage_conf variable.
+
+Until now, the MAXIMA variable held the name of the main maxima
+executable. But there really is no reason to use anything other
+than "maxima -l ecl", which works in all cases. This commit
+replaces the variable with the hard-coded value. This simplifies
+the use of maxima from the system because we no longer need to
+set sage_conf.MAXIMA to any particular value during ./configure.
+---
+ pkgs/sage-conf/sage_conf.py.in         | 2 --
+ src/bin/sage                           | 6 +-----
+ src/sage/env.py                        | 1 -
+ src/sage/interfaces/maxima.py          | 3 +--
+ src/sage/interfaces/maxima_abstract.py | 8 ++++----
+ 5 files changed, 6 insertions(+), 14 deletions(-)
+
 diff --git a/pkgs/sage-conf/sage_conf.py.in b/pkgs/sage-conf/sage_conf.py.in
-index fbce6947de..8cda3ebfac 100644
+index fbce694..b40cda6 100644
 --- a/pkgs/sage-conf/sage_conf.py.in
 +++ b/pkgs/sage-conf/sage_conf.py.in
-@@ -9,9 +9,8 @@ VERSION = "@PACKAGE_VERSION@"
+@@ -9,8 +9,6 @@ VERSION = "@PACKAGE_VERSION@"
  SAGE_LOCAL = "@prefix@"
  SAGE_ROOT = "@SAGE_ROOT@"
  
 -MAXIMA = "@prefix@/bin/maxima"
 -
--# Delete this line if your ECL can load maxima without further prodding.
-+# Set this to the empty string if your ECL can load maxima without
-+# further prodding.
+ # Delete this line if your ECL can load maxima without further prodding.
  MAXIMA_FAS = "@SAGE_MAXIMA_FAS@".replace('${prefix}', SAGE_LOCAL)
  
- # Delete this line if your ECL can load Kenzo without further prodding.
 diff --git a/src/bin/sage b/src/bin/sage
-index fcd263029d..54b69a1043 100755
+index fcd2630..54b69a1 100755
 --- a/src/bin/sage
 +++ b/src/bin/sage
 @@ -684,11 +684,7 @@ fi
@@ -88,22 +76,8 @@ index fcd263029d..54b69a1043 100755
  fi
  
  if [ "$1" = '-mwrank' -o "$1" = '--mwrank' ]; then
-diff --git a/src/bin/sage-env b/src/bin/sage-env
-index a0426df523..f0866b4b1b 100644
---- a/src/bin/sage-env
-+++ b/src/bin/sage-env
-@@ -482,9 +482,6 @@ if [ -d "$DOT_SAGE" ] ; then
-     fi
- fi
- 
--if [ -n "$SAGE_LOCAL" ]; then
--    export MAXIMA_PREFIX="$SAGE_LOCAL"
--fi
- export MAXIMA_USERDIR="$DOT_SAGE/maxima"
- 
- if [ -n "$SAGE_LOCAL" ]; then
 diff --git a/src/sage/env.py b/src/sage/env.py
-index 40ace135f0..95edc16081 100644
+index 40ace13..95edc16 100644
 --- a/src/sage/env.py
 +++ b/src/sage/env.py
 @@ -207,7 +207,6 @@ MATHJAX_DIR = var("MATHJAX_DIR", join(SAGE_SHARE, "mathjax"))
@@ -115,7 +89,7 @@ index 40ace135f0..95edc16081 100644
  KENZO_FAS = var("KENZO_FAS")
  SAGE_NAUTY_BINS_PREFIX = var("SAGE_NAUTY_BINS_PREFIX", "")
 diff --git a/src/sage/interfaces/maxima.py b/src/sage/interfaces/maxima.py
-index fc7f48bc05..7313c7d0d3 100644
+index fc7f48b..7313c7d 100644
 --- a/src/sage/interfaces/maxima.py
 +++ b/src/sage/interfaces/maxima.py
 @@ -484,7 +484,6 @@ import shlex
@@ -136,7 +110,7 @@ index fc7f48bc05..7313c7d0d3 100644
                          script_subdirectory = script_subdirectory,
                          restart_on_ctrlc = False,
 diff --git a/src/sage/interfaces/maxima_abstract.py b/src/sage/interfaces/maxima_abstract.py
-index 917059de0a..c966a3c9a0 100644
+index 917059d..c966a3c 100644
 --- a/src/sage/interfaces/maxima_abstract.py
 +++ b/src/sage/interfaces/maxima_abstract.py
 @@ -54,7 +54,7 @@ import re
@@ -172,3 +146,102 @@ index 917059de0a..c966a3c9a0 100644
          raise RuntimeError('Can use the console only in the terminal. Try %%maxima magics instead.')
 -    os.system('{}'.format(MAXIMA))
 +    os.system('maxima -l ecl')
+-- 
+cgit v1.0-1-gd88e
+
+
+From 88992bfae6d2aba0819b8cd67ae36621a5873b38 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 12 Nov 2021 20:51:28 -0500
+Subject: Trac #32867: new spkg-configure.m4 for maxima.
+
+This new spkg-configure.m4 checks for both a "maxima" executable, and
+the usability of a "maxima" package by ECL. (The latter requires a
+patched maxima until a new release with commit a0d7a43e523 is made.)
+Notably absent for the moment is a version check, but feature testing
+is moot until we decide what to do about matrixexp.patch.
+
+This commit also moves the SAGE_MAXIMA_FAS variable handling from
+ECL's spkg-configure.m4 to maxima's (where it would have belonged in
+the first place, if maxima had an spkg-configure.m4 at the time.)
+---
+ build/pkgs/ecl/spkg-configure.m4    |  5 +----
+ build/pkgs/maxima/spkg-configure.m4 | 35 +++++++++++++++++++++++++++++++++++
+ pkgs/sage-conf/sage_conf.py.in      |  3 ++-
+ 3 files changed, 38 insertions(+), 5 deletions(-)
+ create mode 100644 build/pkgs/maxima/spkg-configure.m4
+
+diff --git a/build/pkgs/ecl/spkg-configure.m4 b/build/pkgs/ecl/spkg-configure.m4
+index ae1e0ac..7dbcfa6 100644
+--- a/build/pkgs/ecl/spkg-configure.m4
++++ b/build/pkgs/ecl/spkg-configure.m4
+@@ -35,10 +35,7 @@ SAGE_SPKG_CONFIGURE([ecl], [
+     AC_SUBST(SAGE_ECL_CONFIG, [$ECL_CONFIG])
+   fi
+ 
+-  # Maxima cannot yet be provided by the system, so we always use
++  # Kenzo cannot yet be provided by the system, so we always use
+   # the SAGE_LOCAL path for now.
+-  AC_SUBST(SAGE_MAXIMA_FAS, ['${prefix}'/lib/ecl/maxima.fas])
+-
+-  # Likewise for the optional Kenzo SPKG
+   AC_SUBST(SAGE_KENZO_FAS, ['${prefix}'/lib/ecl/kenzo.fas])
+ ])
+diff --git a/build/pkgs/maxima/spkg-configure.m4 b/build/pkgs/maxima/spkg-configure.m4
+new file mode 100644
+index 00000000..df625fe
+--- /dev/null
++++ b/build/pkgs/maxima/spkg-configure.m4
+@@ -0,0 +1,35 @@
++SAGE_SPKG_CONFIGURE([maxima], [
++  SAGE_SPKG_DEPCHECK([ecl], [
++    dnl First check for the "maxima" executable in the user's PATH, because
++    dnl we still use pexpect to communicate with it in a few places. We pass
++    dnl the "-l ecl" flag here to ensure that the standalone executable also
++    dnl supports ECL.
++    AC_MSG_CHECKING(if "maxima -l ecl" works)
++    AS_IF([! maxima -l ecl -q -r 'quit();' \
++             >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD], [
++      AC_MSG_RESULT(no)
++      sage_spkg_install_maxima=yes
++    ], [
++      AC_MSG_RESULT(yes)
++      dnl If we have the executable, check also for the ECL library.
++      AC_MSG_CHECKING([if ECL can "require" the maxima module])
++      AS_IF([ecl --eval "(require 'maxima)" --eval "(quit)" \
++               >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD], [
++        AC_MSG_RESULT(yes)
++      ], [
++	AC_MSG_RESULT(no)
++	sage_spkg_install_maxima=yes
++      ])
++    ])
++  ])
++],[],[],[
++  # post-check
++  AS_IF([test x$sage_spkg_install_maxima = xyes], [
++    dnl Leaving this variable empty will tell sagelib to load
++    dnl the maxima library (within ECL) by name instead of by
++    dnl absolute path.
++    SAGE_MAXIMA_FAS='${prefix}'/lib/ecl/maxima.fas
++  ])
++  AC_SUBST(SAGE_MAXIMA_FAS, "${SAGE_MAXIMA_FAS}")
++])
++
+diff --git a/pkgs/sage-conf/sage_conf.py.in b/pkgs/sage-conf/sage_conf.py.in
+index b40cda6..8cda3eb 100644
+--- a/pkgs/sage-conf/sage_conf.py.in
++++ b/pkgs/sage-conf/sage_conf.py.in
+@@ -9,7 +9,8 @@ VERSION = "@PACKAGE_VERSION@"
+ SAGE_LOCAL = "@prefix@"
+ SAGE_ROOT = "@SAGE_ROOT@"
+ 
+-# Delete this line if your ECL can load maxima without further prodding.
++# Set this to the empty string if your ECL can load maxima without
++# further prodding.
+ MAXIMA_FAS = "@SAGE_MAXIMA_FAS@".replace('${prefix}', SAGE_LOCAL)
+ 
+ # Delete this line if your ECL can load Kenzo without further prodding.
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index a1f08000669a..7764899e557f 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -50,7 +50,7 @@ post_extract() {
 	# sage wants to be built in place so let $wrksrc be a symlink
 	rm -rf $_SAGE_ROOT
 	mv -T $wrksrc $_SAGE_ROOT
-	ln -sfT $_SAGE_ROOT $wrksrc
+	ln -srfT $_SAGE_ROOT $wrksrc
 }
 
 do_clean() {
@@ -112,8 +112,8 @@ makedepends+=" cmake curl git ninja pandoc patch pkg-config python3 tox"
 makedepends+="
  CoinMP-devel R arb-devel boost-devel bzip2-devel ecl eclib-devel
  ecm-devel flintlib-devel freetype-devel gc-devel gd-devel giac-devel
- glpk-devel gmp-devel gmpxx-devel gp2c graphviz-devel gsl-devel isl-devel
- libatomic_ops-devel libcurl-devel libffi-devel libmpc-devel
+ glpk-devel gmp-devel gmpxx-devel gp2c graphviz graphviz-devel gsl-devel
+ isl-devel libatomic_ops-devel libcurl-devel libffi-devel libmpc-devel
  libpng-devel libxml2-devel mpfr-devel ncurses-devel openblas-devel
  pari-devel pari-elldata-small pari-galdata pari-galpol-small
  pari-seadata pcre-devel perl-File-Slurp perl-JSON perl-Term-ReadKey
@@ -127,7 +127,7 @@ makedepends+="
  gengetopt texinfo
  brial-devel cliquer-devel gfan libbraiding-devel libhomfly-devel
  lrcalc-devel nauty-devel palp tachyon
- maxima-ecl
+ maxima-ecl primesieve-devel primecount-devel
 "
 
 # TODO: optional

From d406a012a06d75cfbe6ff4d2978d5c770bbca0d6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sun, 19 Dec 2021 13:48:48 -0300
Subject: [PATCH 15/19] sagemath: use system python 3.10

---
 ...3996062c71a9326aafddaf465f6a56b40fe0.patch |  886 ++++++++++++
 ...f82f52b6f05f512cb359ec7c100f93cf8841.patch |  128 ++
 ...77cfadd7b3872ad6f7001fe84fb7568c947c.patch |   84 ++
 ...a54526829b79d5d236a40f83ddc6ce7b2696.patch | 1196 +++++++++++++++++
 srcpkgs/sagemath/template                     |   78 ++
 5 files changed, 2372 insertions(+)
 create mode 100644 srcpkgs/sagemath/patches/trac-30766-system_python_3.10-b5c73996062c71a9326aafddaf465f6a56b40fe0.patch
 create mode 100644 srcpkgs/sagemath/patches/trac-32968-update_sphinx_to_4.3.1-fc84f82f52b6f05f512cb359ec7c100f93cf8841.patch
 create mode 100644 srcpkgs/sagemath/patches/trac-33020-update_ipykernel_to_6.6.0-715277cfadd7b3872ad6f7001fe84fb7568c947c.patch
 create mode 100644 srcpkgs/sagemath/patches/trac-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch

diff --git a/srcpkgs/sagemath/patches/trac-30766-system_python_3.10-b5c73996062c71a9326aafddaf465f6a56b40fe0.patch b/srcpkgs/sagemath/patches/trac-30766-system_python_3.10-b5c73996062c71a9326aafddaf465f6a56b40fe0.patch
new file mode 100644
index 000000000000..eb9b0c3f6672
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-30766-system_python_3.10-b5c73996062c71a9326aafddaf465f6a56b40fe0.patch
@@ -0,0 +1,886 @@
+From fe947f3c9a6109b92dd4c19dda795ceb01c6f9a7 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Wed, 24 Nov 2021 18:23:16 -0800
+Subject: build/pkgs/ipython: Update to 7.29.0
+
+---
+ build/pkgs/ipython/checksums.ini       | 6 +++---
+ build/pkgs/ipython/package-version.txt | 2 +-
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/build/pkgs/ipython/checksums.ini b/build/pkgs/ipython/checksums.ini
+index aa743ea..03da012 100644
+--- a/build/pkgs/ipython/checksums.ini
++++ b/build/pkgs/ipython/checksums.ini
+@@ -1,5 +1,5 @@
+ tarball=ipython-VERSION.tar.gz
+-sha1=a64001602601a4a7917a32b496543153f82dd65a
+-md5=e28a91669dc8b86569a99abed2c67f08
+-cksum=4064786540
++sha1=05165e7fdcebde908aa6b65892ef230795a01e6b
++md5=159340b8ba158386f938a8b882749fed
++cksum=1960065579
+ upstream_url=https://pypi.io/packages/source/i/ipython/ipython-VERSION.tar.gz
+diff --git a/build/pkgs/ipython/package-version.txt b/build/pkgs/ipython/package-version.txt
+index f6b1800..d88eca0 100644
+--- a/build/pkgs/ipython/package-version.txt
++++ b/build/pkgs/ipython/package-version.txt
+@@ -1 +1 @@
+-7.27.0
++7.29.0
+-- 
+cgit v1.0-1-gd88e
+
+
+From 7939a79de125c7f20e981b31c0124e1d80ec9e42 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Wed, 24 Nov 2021 18:28:14 -0800
+Subject: build/pkgs/ipykernel: Update to 6.5.1
+
+---
+ build/pkgs/ipykernel/checksums.ini       | 6 +++---
+ build/pkgs/ipykernel/package-version.txt | 2 +-
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/build/pkgs/ipykernel/checksums.ini b/build/pkgs/ipykernel/checksums.ini
+index 51eb667..ca1302e 100644
+--- a/build/pkgs/ipykernel/checksums.ini
++++ b/build/pkgs/ipykernel/checksums.ini
+@@ -1,5 +1,5 @@
+ tarball=ipykernel-VERSION.tar.gz
+-sha1=19b16c61057bb7f5ad97f7e91bb54cdfec260257
+-md5=329c172babb38dff1be130ddf3a609af
+-cksum=2936157099
++sha1=2c2aa0e929bfd0e694da6b45d2de846a0a5d2812
++md5=78797cb2389d8f131c75280f808aac15
++cksum=1454395629
+ upstream_url=https://pypi.io/packages/source/i/ipykernel/ipykernel-VERSION.tar.gz
+diff --git a/build/pkgs/ipykernel/package-version.txt b/build/pkgs/ipykernel/package-version.txt
+index dc0208a..a194c18 100644
+--- a/build/pkgs/ipykernel/package-version.txt
++++ b/build/pkgs/ipykernel/package-version.txt
+@@ -1 +1 @@
+-6.3.1
++6.5.1
+-- 
+cgit v1.0-1-gd88e
+
+
+From 73df3fc22ba3455befb05758f813caa3dd0a010b Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Wed, 24 Nov 2021 18:28:44 -0800
+Subject: build/pkgs/ipywidgets: Update to 7.6.5
+
+---
+ build/pkgs/ipywidgets/checksums.ini       | 6 +++---
+ build/pkgs/ipywidgets/package-version.txt | 2 +-
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/build/pkgs/ipywidgets/checksums.ini b/build/pkgs/ipywidgets/checksums.ini
+index efb9fe9..af4a04d 100644
+--- a/build/pkgs/ipywidgets/checksums.ini
++++ b/build/pkgs/ipywidgets/checksums.ini
+@@ -1,5 +1,5 @@
+ tarball=ipywidgets-VERSION.tar.gz
+-sha1=8ea8c8e15a4779897dc9f12cc20e29cfe5fb689f
+-md5=771fd3999f93af336c6e40ae1f5c37a2
+-cksum=980834502
++sha1=ad63e99f44fd759c34ab70161e9ac8f4276294f8
++md5=420aabfddee27fc215ad9a9c14c9c529
++cksum=259379988
+ upstream_url=https://pypi.io/packages/source/i/ipywidgets/ipywidgets-VERSION.tar.gz
+diff --git a/build/pkgs/ipywidgets/package-version.txt b/build/pkgs/ipywidgets/package-version.txt
+index b7ade06..bf43f75 100644
+--- a/build/pkgs/ipywidgets/package-version.txt
++++ b/build/pkgs/ipywidgets/package-version.txt
+@@ -1 +1 @@
+-7.6.4.p0
++7.6.5
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5e144e95b13005cfb2cd7e3a3b7abd70d0a902c7 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Wed, 24 Nov 2021 18:30:04 -0800
+Subject: build/pkgs/jedi: Update to 0.18.1
+
+---
+ build/pkgs/jedi/checksums.ini       | 6 +++---
+ build/pkgs/jedi/package-version.txt | 2 +-
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/build/pkgs/jedi/checksums.ini b/build/pkgs/jedi/checksums.ini
+index f5be931..2db629c 100644
+--- a/build/pkgs/jedi/checksums.ini
++++ b/build/pkgs/jedi/checksums.ini
+@@ -1,5 +1,5 @@
+ tarball=jedi-VERSION.tar.gz
+-sha1=f9acd323b88563fafb5bb4dff592794a2713a15c
+-md5=72707c00e8d6d0b190a5e5664be1cac5
+-cksum=620165561
++sha1=e94444bd83b55247fd1f3d27d47cc0b148560134
++md5=d8dba4a98a35530f7f5b461c20aff180
++cksum=4093067035
+ upstream_url=https://pypi.io/packages/source/j/jedi/jedi-VERSION.tar.gz
+diff --git a/build/pkgs/jedi/package-version.txt b/build/pkgs/jedi/package-version.txt
+index 6633391..249afd5 100644
+--- a/build/pkgs/jedi/package-version.txt
++++ b/build/pkgs/jedi/package-version.txt
+@@ -1 +1 @@
+-0.18.0
++0.18.1
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6347f984a697b3aecfe0ed6d2f7363c9dc3b5b65 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Wed, 24 Nov 2021 18:30:58 -0800
+Subject: build/pkgs/prompt_toolkit: Update to 3.0.22
+
+---
+ build/pkgs/prompt_toolkit/checksums.ini       | 6 +++---
+ build/pkgs/prompt_toolkit/package-version.txt | 2 +-
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/build/pkgs/prompt_toolkit/checksums.ini b/build/pkgs/prompt_toolkit/checksums.ini
+index 7868d1a..0e3fe14 100644
+--- a/build/pkgs/prompt_toolkit/checksums.ini
++++ b/build/pkgs/prompt_toolkit/checksums.ini
+@@ -1,5 +1,5 @@
+ tarball=prompt_toolkit-VERSION.tar.gz
+-sha1=20fe2a6126ee2b992d9f77cd20e4b80626b036d7
+-md5=ba9e63c3e7e5a4f4ce4e4770a4daba96
+-cksum=3647925903
++sha1=5efb27677b89b2c81241645c6658e60771af3b7b
++md5=bbaeba1142a64ecf2264eaf4f85201b1
++cksum=1605705668
+ upstream_url=https://pypi.io/packages/source/p/prompt_toolkit/prompt_toolkit-VERSION.tar.gz
+diff --git a/build/pkgs/prompt_toolkit/package-version.txt b/build/pkgs/prompt_toolkit/package-version.txt
+index 3e4a61b..6795d4d 100644
+--- a/build/pkgs/prompt_toolkit/package-version.txt
++++ b/build/pkgs/prompt_toolkit/package-version.txt
+@@ -1 +1 @@
+-3.0.20
++3.0.22
+-- 
+cgit v1.0-1-gd88e
+
+
+From 28e535d3a1dd6b67e740b1900c4fad36cccd1121 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Wed, 24 Nov 2021 18:32:02 -0800
+Subject: build/pkgs/widgetsnbextension: Update to 3.5.2
+
+---
+ build/pkgs/widgetsnbextension/checksums.ini       | 6 +++---
+ build/pkgs/widgetsnbextension/package-version.txt | 2 +-
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/build/pkgs/widgetsnbextension/checksums.ini b/build/pkgs/widgetsnbextension/checksums.ini
+index 2f7e946..81205c5 100644
+--- a/build/pkgs/widgetsnbextension/checksums.ini
++++ b/build/pkgs/widgetsnbextension/checksums.ini
+@@ -1,5 +1,5 @@
+ tarball=widgetsnbextension-VERSION.tar.gz
+-sha1=f92ee894f3b08cfb6cfac0856d77521bbbf45e92
+-md5=3dc5f96919c032a885950e3819bdee7b
+-cksum=4195536255
++sha1=010f70ab9a6d6e0a4f9607cce0da182ee6c1280a
++md5=c126a06559afe658e285bcd483790710
++cksum=160710350
+ upstream_url=https://pypi.io/packages/source/w/widgetsnbextension/widgetsnbextension-VERSION.tar.gz
+diff --git a/build/pkgs/widgetsnbextension/package-version.txt b/build/pkgs/widgetsnbextension/package-version.txt
+index ffe3090..87ce492 100644
+--- a/build/pkgs/widgetsnbextension/package-version.txt
++++ b/build/pkgs/widgetsnbextension/package-version.txt
+@@ -1 +1 @@
+-3.5.1.p0
++3.5.2
+-- 
+cgit v1.0-1-gd88e
+
+
+From 63078ac3e486d986d43e78f76a2037455147b8da Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Wed, 24 Nov 2021 18:33:12 -0800
+Subject: build/pkgs/terminado: Update to 0.12.1
+
+---
+ build/pkgs/terminado/checksums.ini       | 6 +++---
+ build/pkgs/terminado/package-version.txt | 2 +-
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/build/pkgs/terminado/checksums.ini b/build/pkgs/terminado/checksums.ini
+index ba1b392..f33efd4 100644
+--- a/build/pkgs/terminado/checksums.ini
++++ b/build/pkgs/terminado/checksums.ini
+@@ -1,5 +1,5 @@
+ tarball=terminado-VERSION.tar.gz
+-sha1=9a4f75d9f1bad0e7eadf33da774ab4e09d75a47b
+-md5=8150154423841a90b1d8ca60943ad84c
+-cksum=2702442904
++sha1=65f40480c1d8077b78dcffb7e0c909eae86998bf
++md5=4871263f6aaed18e09603fa6785b4340
++cksum=2070178009
+ upstream_url=https://pypi.io/packages/source/t/terminado/terminado-VERSION.tar.gz
+diff --git a/build/pkgs/terminado/package-version.txt b/build/pkgs/terminado/package-version.txt
+index af88ba8..34a8361 100644
+--- a/build/pkgs/terminado/package-version.txt
++++ b/build/pkgs/terminado/package-version.txt
+@@ -1 +1 @@
+-0.11.1
++0.12.1
+-- 
+cgit v1.0-1-gd88e
+
+
+From 22de5dc202d63cbcef3a752a6c68e7d99332d705 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Wed, 24 Nov 2021 18:34:42 -0800
+Subject: build/pkgs/notebook: Update to 6.4.6
+
+---
+ build/pkgs/notebook/checksums.ini       | 6 +++---
+ build/pkgs/notebook/package-version.txt | 2 +-
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/build/pkgs/notebook/checksums.ini b/build/pkgs/notebook/checksums.ini
+index 1355f59..29c39e9 100644
+--- a/build/pkgs/notebook/checksums.ini
++++ b/build/pkgs/notebook/checksums.ini
+@@ -1,5 +1,5 @@
+ tarball=notebook-VERSION.tar.gz
+-sha1=0a6d27e401d04d516c3851862491824007272dc0
+-md5=718f7f0267e0111b4ef9ff3238e9f7e8
+-cksum=2383141171
++sha1=93736a3a9c5b025f71a25a301b676a40aca3124b
++md5=ecb9319cf82a9a83b1c4c8e1cc4efbee
++cksum=1697144622
+ upstream_url=https://pypi.io/packages/source/n/notebook/notebook-VERSION.tar.gz
+diff --git a/build/pkgs/notebook/package-version.txt b/build/pkgs/notebook/package-version.txt
+index 133cad2..3d05e8c 100644
+--- a/build/pkgs/notebook/package-version.txt
++++ b/build/pkgs/notebook/package-version.txt
+@@ -1 +1 @@
+-6.4.3
++6.4.6
+-- 
+cgit v1.0-1-gd88e
+
+
+From a0fe18ba460d87e0bd46ada9f4246baa49c7c251 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Wed, 24 Nov 2021 18:35:36 -0800
+Subject: build/pkgs/nbclient: Update to 0.5.4
+
+---
+ build/pkgs/nbclient/checksums.ini       | 6 +++---
+ build/pkgs/nbclient/package-version.txt | 2 +-
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/build/pkgs/nbclient/checksums.ini b/build/pkgs/nbclient/checksums.ini
+index 914ee93..b1f9790 100644
+--- a/build/pkgs/nbclient/checksums.ini
++++ b/build/pkgs/nbclient/checksums.ini
+@@ -1,5 +1,5 @@
+ tarball=nbclient-VERSION.tar.gz
+-sha1=9c1059878ae04da987ae00025908ae802cbfc066
+-md5=593579773bd8128f845ea01a46ccbedb
+-cksum=2389564342
++sha1=a5efba590429270c901f4f5a16c8b46a7e6b8e4a
++md5=a3cf8c1c121b0718a6ccf384c5683424
++cksum=2650264415
+ upstream_url=https://pypi.io/packages/source/n/nbclient/nbclient-VERSION.tar.gz
+diff --git a/build/pkgs/nbclient/package-version.txt b/build/pkgs/nbclient/package-version.txt
+index 7d85683..416bfb0 100644
+--- a/build/pkgs/nbclient/package-version.txt
++++ b/build/pkgs/nbclient/package-version.txt
+@@ -1 +1 @@
+-0.5.4
++0.5.9
+-- 
+cgit v1.0-1-gd88e
+
+
+From ef3fc7f3a0877ee92dd1bf6e8d6e8c84db9f6050 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Wed, 24 Nov 2021 18:38:02 -0800
+Subject: build/pkgs/jupyter_client: Update to 7.1.0
+
+---
+ build/pkgs/jupyter_client/checksums.ini       | 6 +++---
+ build/pkgs/jupyter_client/package-version.txt | 2 +-
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/build/pkgs/jupyter_client/checksums.ini b/build/pkgs/jupyter_client/checksums.ini
+index ab486e6..cbe7b83 100644
+--- a/build/pkgs/jupyter_client/checksums.ini
++++ b/build/pkgs/jupyter_client/checksums.ini
+@@ -1,5 +1,5 @@
+ tarball=jupyter_client-VERSION.tar.gz
+-sha1=d03249e98f821ac8f43408e71b5390cef336d859
+-md5=7c6ef694cde43fd365046869842a1cde
+-cksum=236454943
++sha1=aad5dd5337e20e53de66e094092333e04d9c4e1d
++md5=33fb5eab82f3e89c68f2082b52a8e966
++cksum=481041414
+ upstream_url=https://pypi.io/packages/source/j/jupyter_client/jupyter_client-VERSION.tar.gz
+diff --git a/build/pkgs/jupyter_client/package-version.txt b/build/pkgs/jupyter_client/package-version.txt
+index a8907c0..a3fcc71 100644
+--- a/build/pkgs/jupyter_client/package-version.txt
++++ b/build/pkgs/jupyter_client/package-version.txt
+@@ -1 +1 @@
+-7.0.2
++7.1.0
+-- 
+cgit v1.0-1-gd88e
+
+
+From a593bc993aa860f847b803a3d41fe7c2d5d99780 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Wed, 24 Nov 2021 18:40:11 -0800
+Subject: build/pkgs/jupyter_core: Update to 4.9.1
+
+---
+ build/pkgs/jupyter_core/checksums.ini       | 6 +++---
+ build/pkgs/jupyter_core/package-version.txt | 2 +-
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/build/pkgs/jupyter_core/checksums.ini b/build/pkgs/jupyter_core/checksums.ini
+index 8310cf0..f3a3068 100644
+--- a/build/pkgs/jupyter_core/checksums.ini
++++ b/build/pkgs/jupyter_core/checksums.ini
+@@ -1,5 +1,5 @@
+ tarball=jupyter_core-VERSION.tar.gz
+-sha1=01e57900f8e4475fb90ae533cf7ebd6f4c323867
+-md5=adc204a306a7122a61aa742ccc4c252a
+-cksum=1333962761
++sha1=afa48d85b3611beb42236be3c130767a6524ccfd
++md5=77a1e7642abfb834a6046e14b94f5c88
++cksum=1811078933
+ upstream_url=https://pypi.io/packages/source/j/jupyter_core/jupyter_core-VERSION.tar.gz
+diff --git a/build/pkgs/jupyter_core/package-version.txt b/build/pkgs/jupyter_core/package-version.txt
+index 7c66fca..5b341fd 100644
+--- a/build/pkgs/jupyter_core/package-version.txt
++++ b/build/pkgs/jupyter_core/package-version.txt
+@@ -1 +1 @@
+-4.7.1
++4.9.1
+-- 
+cgit v1.0-1-gd88e
+
+
+From 66c16b14f9081c6d62f5d105cfe76b470074c187 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Wed, 24 Nov 2021 18:41:20 -0800
+Subject: build/pkgs/importlib_metadata: Update to 4.8.2
+
+---
+ build/pkgs/importlib_metadata/checksums.ini       | 6 +++---
+ build/pkgs/importlib_metadata/package-version.txt | 2 +-
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/build/pkgs/importlib_metadata/checksums.ini b/build/pkgs/importlib_metadata/checksums.ini
+index 4006b51..d5a9b1a 100644
+--- a/build/pkgs/importlib_metadata/checksums.ini
++++ b/build/pkgs/importlib_metadata/checksums.ini
+@@ -1,5 +1,5 @@
+ tarball=importlib_metadata-VERSION.tar.gz
+-sha1=1572500dd099439cbd86bb70bfe1d206fbc844f6
+-md5=5b944bce3fccaf848f0cba7a07f850a1
+-cksum=416853070
++sha1=7d15d8e06299a8f24e076600899aceee75ce8b0b
++md5=a605ba6ec315bc1324fd6b7210fe7c12
++cksum=448954927
+ upstream_url=https://pypi.io/packages/source/i/importlib_metadata/importlib_metadata-VERSION.tar.gz
+diff --git a/build/pkgs/importlib_metadata/package-version.txt b/build/pkgs/importlib_metadata/package-version.txt
+index 697e993..326ec63 100644
+--- a/build/pkgs/importlib_metadata/package-version.txt
++++ b/build/pkgs/importlib_metadata/package-version.txt
+@@ -1 +1 @@
+-4.8.1
++4.8.2
+-- 
+cgit v1.0-1-gd88e
+
+
+From 27fbff02000609d9bf9c5f429b887e321148c6b6 Mon Sep 17 00:00:00 2001
+From: Antonio Rojas <arojas@archlinux.org>
+Date: Sun, 12 Dec 2021 09:57:10 +0100
+Subject: Assign module property to test class
+
+Otherwise, Python 3.10 will report a "source code not available" error, see https://github.com/python/cpython/commit/48a62559dfaf775e4f1cc56b19379c799e8e2587
+---
+ src/sage/misc/sageinspect.py | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/sage/misc/sageinspect.py b/src/sage/misc/sageinspect.py
+index fb2073f..bd89233 100644
+--- a/src/sage/misc/sageinspect.py
++++ b/src/sage/misc/sageinspect.py
+@@ -1585,6 +1585,8 @@ def sage_getargspec(obj):
+         ....:     'class Foo:\n'
+         ....:     '    def __call__(self):\n'
+         ....:     '        return None\n'
++        ....:     '    def __module__(self):\n'
++        ....:     '        return "sage.misc.sageinspect"\n'
+         ....:     '    def _sage_src_(self):\n'
+         ....:     '        return "the source code string"')
+         sage: shell.run_cell('f = Foo()')
+-- 
+cgit v1.0-1-gd88e
+
+
+From 26c9b33878aef88a0b1e88d6664823d9d4591a5f Mon Sep 17 00:00:00 2001
+From: Antonio Rojas <arojas@archlinux.org>
+Date: Sun, 12 Dec 2021 09:59:07 +0100
+Subject: Add abs tol to some tests to make them pass with Python 3.10
+
+---
+ src/sage/plot/colors.py | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/src/sage/plot/colors.py b/src/sage/plot/colors.py
+index 6fdba0f..f46b736 100644
+--- a/src/sage/plot/colors.py
++++ b/src/sage/plot/colors.py
+@@ -918,12 +918,12 @@ class Color(object):
+ 
+             sage: Color(0.3, 0.5, 0.7, space='hls').hls()
+             (0.30000000000000004, 0.5, 0.7)
+-            sage: Color(0.3, 0.5, 0.7, space='hsl').hls()
++            sage: Color(0.3, 0.5, 0.7, space='hsl').hls() # abs tol 1e-15
+             (0.30000000000000004, 0.7, 0.5000000000000001)
+-            sage: Color('#aabbcc').hls()
++            sage: Color('#aabbcc').hls() # abs tol 1e-15
+             (0.5833333333333334, 0.7333333333333334, 0.25000000000000017)
+             sage: from sage.plot.colors import orchid
+-            sage: orchid.hls()
++            sage: orchid.hls() # abs tol 1e-15
+             (0.8396226415094339, 0.6470588235294117, 0.5888888888888889)
+         """
+         return tuple(map(float, rgb_to_hls(*self._rgb)))
+@@ -942,9 +942,9 @@ class Color(object):
+             sage: Color(1,0,0).hsl()
+             (0.0, 1.0, 0.5)
+             sage: from sage.plot.colors import orchid
+-            sage: orchid.hsl()
++            sage: orchid.hsl() # abs tol 1e-15
+             (0.8396226415094339, 0.5888888888888889, 0.6470588235294117)
+-            sage: Color('#aabbcc').hsl()
++            sage: Color('#aabbcc').hsl() # abs tol 1e-15
+             (0.5833333333333334, 0.25000000000000017, 0.7333333333333334)
+         """
+         h, l, s = tuple(map(float, rgb_to_hls(*self._rgb)))
+-- 
+cgit v1.0-1-gd88e
+
+
+From 079ceca95e5d3ad9fb81d3234df3e984ddde09d4 Mon Sep 17 00:00:00 2001
+From: Antonio Rojas <arojas@archlinux.org>
+Date: Sun, 12 Dec 2021 09:59:43 +0100
+Subject: Add missing space
+
+Surprisingly, this didn't throw an error before Python 3.10
+---
+ src/sage/schemes/riemann_surfaces/riemann_surface.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/sage/schemes/riemann_surfaces/riemann_surface.py b/src/sage/schemes/riemann_surfaces/riemann_surface.py
+index 3c3d387..f9d1e2b 100644
+--- a/src/sage/schemes/riemann_surfaces/riemann_surface.py
++++ b/src/sage/schemes/riemann_surfaces/riemann_surface.py
+@@ -1390,7 +1390,7 @@ class RiemannSurface(object):
+             sage: S = RiemannSurface(f)
+             sage: _ = S.homology_basis()
+             sage: g,d = S.make_zw_interpolator([(0,0),(1,0)]);
+-            sage: all(f(*g(i*0.1)).abs() < 1e-13for i in range(10))
++            sage: all(f(*g(i*0.1)).abs() < 1e-13 for i in range(10))
+             True
+             sage: abs((g(1)[0]-g(0)[0]) - d) < 1e-13
+             True
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6603e290fff0e49a6394e40382c4ebdc8975049d Mon Sep 17 00:00:00 2001
+From: Antonio Rojas <arojas@archlinux.org>
+Date: Sun, 12 Dec 2021 10:00:49 +0100
+Subject: Update some error messages to match Python 3.10 format
+
+---
+ src/sage/structure/unique_representation.py |  2 +-
+ src/sage/symbolic/callable.py               | 10 +++++-----
+ 2 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/src/sage/structure/unique_representation.py b/src/sage/structure/unique_representation.py
+index 9ead7a4..5d8d4ad 100644
+--- a/src/sage/structure/unique_representation.py
++++ b/src/sage/structure/unique_representation.py
+@@ -1221,7 +1221,7 @@ class UniqueRepresentation(CachedRepresentation, WithEqualityById):
+         sage: isinstance(GF(7), GF)
+         Traceback (most recent call last):
+         ...
+-        TypeError: isinstance() arg 2 must be a type or tuple of types
++        TypeError: isinstance() arg 2 must be a type...
+ 
+         sage: isinstance(GF, sage.structure.factory.UniqueFactory)
+         True
+diff --git a/src/sage/symbolic/callable.py b/src/sage/symbolic/callable.py
+index 5f3a7be..4b8efda 100644
+--- a/src/sage/symbolic/callable.py
++++ b/src/sage/symbolic/callable.py
+@@ -38,27 +38,27 @@ The arguments in the definition must be symbolic variables (:trac:`10747`)::
+     sage: f(1)=2
+     Traceback (most recent call last):
+     ...
+-    SyntaxError: can...t assign to function call
++    SyntaxError: can...t assign to function call...
+ 
+     sage: f(x,1)=2
+     Traceback (most recent call last):
+     ...
+-    SyntaxError: can...t assign to function call
++    SyntaxError: can...t assign to function call...
+ 
+     sage: f(1,2)=3
+     Traceback (most recent call last):
+     ...
+-    SyntaxError: can...t assign to function call
++    SyntaxError: can...t assign to function call...
+ 
+     sage: f(1,2)=x
+     Traceback (most recent call last):
+     ...
+-    SyntaxError: can...t assign to function call
++    SyntaxError: can...t assign to function call...
+ 
+     sage: f(x,2)=x
+     Traceback (most recent call last):
+     ...
+-    SyntaxError: can...t assign to function call
++    SyntaxError: can...t assign to function call...
+ """
+ 
+ import sage.rings.abc
+-- 
+cgit v1.0-1-gd88e
+
+
+From f345263b8c46d72d12fb1d2482fbfbbd6f23a570 Mon Sep 17 00:00:00 2001
+From: Antonio Rojas <arojas@archlinux.org>
+Date: Sun, 12 Dec 2021 10:01:18 +0100
+Subject: Make sure the timeout passed to select.select is a float
+
+Python 3.10 does a type check
+---
+ src/sage/tests/cmdline.py | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/sage/tests/cmdline.py b/src/sage/tests/cmdline.py
+index 4f16b0e..ba5aa14 100644
+--- a/src/sage/tests/cmdline.py
++++ b/src/sage/tests/cmdline.py
+@@ -766,6 +766,7 @@ def test_executable(args, input="", timeout=100.0, pydebug_ignore_warnings=False
+             rfd.append(fderr)
+         if len(rfd) == 0:
+             break
++        timeout = float(timeout)
+         rlist = select.select(rfd, [], [], timeout)[0]
+ 
+         if len(rlist) == 0:
+-- 
+cgit v1.0-1-gd88e
+
+
+From 2f13b8666aef7001b7464f7cf68d145a5752c067 Mon Sep 17 00:00:00 2001
+From: Antonio Rojas <arojas@archlinux.org>
+Date: Sun, 12 Dec 2021 18:30:05 +0100
+Subject: Update another error message for Python 3.10
+
+---
+ src/sage/rings/asymptotic/growth_group.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/sage/rings/asymptotic/growth_group.py b/src/sage/rings/asymptotic/growth_group.py
+index ba7e684..a91ec31 100644
+--- a/src/sage/rings/asymptotic/growth_group.py
++++ b/src/sage/rings/asymptotic/growth_group.py
+@@ -5434,7 +5434,7 @@ class GrowthGroupFactory(UniqueFactory):
+             describing a growth group.
+             > *previous* ValueError: Cannot create a parent out of 'as'.
+             >> *previous* ValueError: unknown specification as
+-            >> *and* SyntaxError: unexpected EOF while parsing (<string>, line 1)
++            >> *and* SyntaxError: ... (<string>, line 1)
+             > *and* ValueError: Cannot create a parent out of 'df'.
+             >> *previous* ValueError: unknown specification df
+             >> *and* NameError: name 'df' is not defined
+-- 
+cgit v1.0-1-gd88e
+
+
+From e65ae6ca71fbe284affeb4ed88e63acc97a3fe0a Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Mon, 24 May 2021 17:06:47 -0700
+Subject: build/pkgs/python3/spkg-configure.m4: Accept system python 3.10.x
+
+---
+ build/pkgs/python3/spkg-configure.m4 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/build/pkgs/python3/spkg-configure.m4 b/build/pkgs/python3/spkg-configure.m4
+index df74019..3cbb994 100644
+--- a/build/pkgs/python3/spkg-configure.m4
++++ b/build/pkgs/python3/spkg-configure.m4
+@@ -1,7 +1,7 @@
+ SAGE_SPKG_CONFIGURE([python3], [
+    m4_pushdef([MIN_VERSION],               [3.7.0])
+    m4_pushdef([MIN_NONDEPRECATED_VERSION], [3.7.0])
+-   m4_pushdef([LT_VERSION],                [3.10.0])
++   m4_pushdef([LT_VERSION],                [3.11.0])
+    AC_ARG_WITH([python],
+                [AS_HELP_STRING([--with-python=PYTHON3],
+                                [Python 3 executable to use for the Sage venv; default: python3])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 59173d01b4ed85077a847d2643c80bb3499c926a Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Wed, 15 Sep 2021 17:49:12 -0700
+Subject: pkgs/sage-setup/setup.cfg: Allow Python 3.10
+
+---
+ pkgs/sage-setup/setup.cfg | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/pkgs/sage-setup/setup.cfg b/pkgs/sage-setup/setup.cfg
+index a1710d4..197fc67 100644
+--- a/pkgs/sage-setup/setup.cfg
++++ b/pkgs/sage-setup/setup.cfg
+@@ -31,7 +31,7 @@ packages =
+     sage_setup.autogen.interpreters.specs
+     sage_setup.command
+ 
+-python_requires = >=3.7, <3.10
++python_requires = >=3.7, <3.11
+ 
+ install_requires =
+     pkgconfig
+-- 
+cgit v1.0-1-gd88e
+
+
+From c902b7bc44c1b2116416962ec1194b8e59f11f06 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Fri, 17 Dec 2021 09:15:25 -0800
+Subject: src/setup.cfg.m4: Allow Python 3.10
+
+---
+ src/setup.cfg.m4 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/setup.cfg.m4 b/src/setup.cfg.m4
+index 16f88f2..b8bd0c0 100644
+--- a/src/setup.cfg.m4
++++ b/src/setup.cfg.m4
+@@ -26,7 +26,7 @@ classifiers =
+     Topic :: Scientific/Engineering :: Mathematics
+ 
+ [options]
+-python_requires = >=3.7, <3.10
++python_requires = >=3.7, <3.11
+ install_requires =
+     sage_conf
+     esyscmd(`sage-get-system-packages install-requires \
+-- 
+cgit v1.0-1-gd88e
+
+
+From cb305525af1f872d00bb63387f7c68b88fb70a38 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Fri, 17 Dec 2021 09:38:43 -0800
+Subject: build/pkgs/python3/spkg-configure.m4: Warn on system python 3.10.x
+
+---
+ build/pkgs/python3/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/build/pkgs/python3/spkg-configure.m4 b/build/pkgs/python3/spkg-configure.m4
+index 3cbb994..5e3481a 100644
+--- a/build/pkgs/python3/spkg-configure.m4
++++ b/build/pkgs/python3/spkg-configure.m4
+@@ -1,6 +1,7 @@
+ SAGE_SPKG_CONFIGURE([python3], [
+    m4_pushdef([MIN_VERSION],               [3.7.0])
+    m4_pushdef([MIN_NONDEPRECATED_VERSION], [3.7.0])
++   m4_pushdef([LT_STABLE_VERSION],         [3.10.0])
+    m4_pushdef([LT_VERSION],                [3.11.0])
+    AC_ARG_WITH([python],
+                [AS_HELP_STRING([--with-python=PYTHON3],
+@@ -116,6 +117,10 @@ and will be removed in the next development cycle.  Consider using a newer versi
+ that may be available on your system or can be installed using the system package manager.
+ To build Sage with a different system python, use ./configure --with-python=/path/to/python])
+         ])
++        AX_COMPARE_VERSION([$python3_version], [ge], LT_STABLE_VERSION, [
++            AC_MSG_WARN([Support for system python >= LT_STABLE_VERSION is experimental.
++To build Sage with a different system python, use ./configure --with-python=/path/to/python])
++        ])
+     ])
+     AC_SUBST([PYTHON_FOR_VENV])
+ 
+-- 
+cgit v1.0-1-gd88e
+
+
+From 249357dd30c54162e4b9204d6113c70b310a5087 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sat, 18 Dec 2021 13:35:21 -0800
+Subject: sage.cpython.atexit: fix for python 3.10 (#30766)
+
+---
+ src/sage/cpython/atexit.pyx | 75 +++++++++++++++++++++++++++++----------------
+ 1 file changed, 48 insertions(+), 27 deletions(-)
+
+diff --git a/src/sage/cpython/atexit.pyx b/src/sage/cpython/atexit.pyx
+index 5b0c6d1..3ba391b 100644
+--- a/src/sage/cpython/atexit.pyx
++++ b/src/sage/cpython/atexit.pyx
+@@ -144,43 +144,63 @@ cdef class restore_atexit:
+ 
+ from cpython.ref cimport PyObject
+ 
+-# Internal structures defined in the CPython source in
+-# Modules/atexitmodule.c and subject to (but unlikely to) change.  Watch
+-# https://bugs.python.org/issue32082 for a request to (eventually)
+-# re-expose more of the atexit module's internals to Python
+-ctypedef struct atexit_callback:
+-    PyObject* func
+-    PyObject* args
+-    PyObject* kwargs
+-
+-
+-ctypedef struct atexitmodule_state:
+-    atexit_callback** atexit_callbacks
+-    int ncallbacks
+-    int callback_len
+-
+-
+-cdef extern from "Python.h":
+-    void* PyModule_GetState(object module)
+-
++# Implement "_atexit_callbacks()" for each supported python version
++cdef extern from *:
++    """
++    #if PY_VERSION_HEX >= 0x030a0000
++    /********** Python 3.10 **********/
++    #define Py_BUILD_CORE
++    #undef _PyGC_FINALIZED
++    #include "internal/pycore_interp.h"
++    #include "internal/pycore_pystate.h"
++    static atexit_callback ** _atexit_callbacks(PyObject *self) {
++        PyInterpreterState *interp = _PyInterpreterState_GET();
++        struct atexit_state state = interp->atexit;
++        return state.callbacks;
++    }
++    #else
++    /********** Python < 3.10 **********/
++    /* Internal structures defined in the CPython source in
++     * Modules/atexitmodule.c and subject to (but unlikely to) change.  Watch
++     * https://bugs.python.org/issue32082 for a request to (eventually)
++     * re-expose more of the atexit module's internals to Python
++     * typedef struct
++     */
++    typedef struct {
++        PyObject *func;
++        PyObject *args;
++        PyObject *kwargs;
++    } atexit_callback;
++    typedef struct {
++        atexit_callback **atexit_callbacks;
++        int ncallbacks;
++        int callback_len;
++    } atexitmodule_state;
++    static atexit_callback ** _atexit_callbacks(PyObject *self) {
++        atexitmodule_state *state = PyModule_GetState(self);
++        return state->atexit_callbacks;
++    }
++    #endif
++    """
++    ctypedef struct atexit_callback:
++        PyObject* func
++        PyObject* args
++        PyObject* kwargs
++    atexit_callback** _atexit_callbacks(object module)
+ 
+ def _get_exithandlers():
+     """Return list of exit handlers registered with the atexit module."""
+-    cdef atexitmodule_state* state
++    cdef atexit_callback ** callbacks
+     cdef atexit_callback callback
+     cdef list exithandlers
+     cdef int idx
+     cdef object kwargs
+ 
+-    state = <atexitmodule_state*>PyModule_GetState(atexit)
+-
+-    if not state:
+-        raise RuntimeError("atexit module state missing or corrupt")
+-
+     exithandlers = []
++    callbacks = _atexit_callbacks(atexit)
+ 
+-    for idx in range(state.ncallbacks):
+-        callback = state.atexit_callbacks[idx][0]
++    for idx in range(atexit._ncallbacks()):
++        callback = callbacks[idx][0]
+         if callback.kwargs:
+             kwargs = <object>callback.kwargs
+         else:
+@@ -207,4 +227,5 @@ def _set_exithandlers(exithandlers):
+ 
+ def _clear_exithandlers():
+     """Clear the atexit module of all registered exit handlers."""
++
+     atexit._clear()
+-- 
+cgit v1.0-1-gd88e
+
+
+From df9f1d4ced4264f65ab704f725f6f5879b012796 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Sun, 19 Dec 2021 22:36:44 -0300
+Subject: Pass float(0.5) to time.sleep
+
+Since python 3.10, passing RealNumber breaks.
+---
+ src/sage_docbuild/utils.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/sage_docbuild/utils.py b/src/sage_docbuild/utils.py
+index 956d703f..3e4793e 100644
+--- a/src/sage_docbuild/utils.py
++++ b/src/sage_docbuild/utils.py
+@@ -79,7 +79,7 @@ def build_many(target, args, processes=None):
+         ....:         # Task 4 is a poison pill
+         ....:         1 / 0
+         ....:     else:
+-        ....:         time.sleep(0.5)
++        ....:         time.sleep(float(0.5))
+         ....:         print('Processed task %s' % N)
+         ....:
+ 
+@@ -104,7 +104,7 @@ def build_many(target, args, processes=None):
+         ....:         # Task 4 is a poison pill
+         ....:         os.kill(os.getpid(), signal.SIGKILL)
+         ....:     else:
+-        ....:         time.sleep(0.5)
++        ....:         time.sleep(float(0.5))
+         ....:         print('Processed task %s' % N)
+         ....:
+         sage: build_many(target, range(8), processes=8)
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/trac-32968-update_sphinx_to_4.3.1-fc84f82f52b6f05f512cb359ec7c100f93cf8841.patch b/srcpkgs/sagemath/patches/trac-32968-update_sphinx_to_4.3.1-fc84f82f52b6f05f512cb359ec7c100f93cf8841.patch
new file mode 100644
index 000000000000..8bce2b2a63e1
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-32968-update_sphinx_to_4.3.1-fc84f82f52b6f05f512cb359ec7c100f93cf8841.patch
@@ -0,0 +1,128 @@
+From e2adfb1efbc76a439ddc7c028288e3f011244878 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Fran=C3=A7ois=20Bissey?= <frp.bissey@gmail.com>
+Date: Mon, 13 Dec 2021 11:18:44 +1300
+Subject: Update sphinx to 4.3.1
+
+---
+ build/pkgs/sphinx/checksums.ini        | 6 +++---
+ build/pkgs/sphinx/install-requires.txt | 2 +-
+ build/pkgs/sphinx/package-version.txt  | 2 +-
+ 3 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/build/pkgs/sphinx/checksums.ini b/build/pkgs/sphinx/checksums.ini
+index f7ba552..02fcbde 100644
+--- a/build/pkgs/sphinx/checksums.ini
++++ b/build/pkgs/sphinx/checksums.ini
+@@ -1,5 +1,5 @@
+ tarball=Sphinx-VERSION.tar.gz
+-sha1=b7d3ad1e91059d62044a3296112fa6662a38f089
+-md5=6af34550e36dd6d58a496e47ec67280f
+-cksum=1867791932
++sha1=f1c33352c018a5a3df39d5f01c3e38c8c063d6c9
++md5=08f6589fa8ab57fd36f0f80d1079b233
++cksum=2796062391
+ upstream_url=https://pypi.io/packages/source/s/sphinx/Sphinx-VERSION.tar.gz
+diff --git a/build/pkgs/sphinx/install-requires.txt b/build/pkgs/sphinx/install-requires.txt
+index 0c661b6..0a751b2 100644
+--- a/build/pkgs/sphinx/install-requires.txt
++++ b/build/pkgs/sphinx/install-requires.txt
+@@ -1 +1 @@
+-sphinx >=4, <4.3
++sphinx >=4.3, <4.4
+diff --git a/build/pkgs/sphinx/package-version.txt b/build/pkgs/sphinx/package-version.txt
+index 6aba2b2..f77856a 100644
+--- a/build/pkgs/sphinx/package-version.txt
++++ b/build/pkgs/sphinx/package-version.txt
+@@ -1 +1 @@
+-4.2.0
++4.3.1
+-- 
+cgit v1.0-1-gd88e
+
+
+From efb00a873b766b6e2be4be9818f2e9bedb6a9238 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Fran=C3=A7ois=20Bissey?= <frp.bissey@gmail.com>
+Date: Mon, 13 Dec 2021 11:19:13 +1300
+Subject: update sphinx dependency list and special installation instructions
+
+---
+ build/pkgs/sphinx/SPKG.rst | 12 +-----------
+ 1 file changed, 1 insertion(+), 11 deletions(-)
+
+diff --git a/build/pkgs/sphinx/SPKG.rst b/build/pkgs/sphinx/SPKG.rst
+index 62a8ff0..2a34c9d 100644
+--- a/build/pkgs/sphinx/SPKG.rst
++++ b/build/pkgs/sphinx/SPKG.rst
+@@ -27,21 +27,11 @@ Upstream Contact
+ Dependencies
+ ------------
+ 
+--  six >= 1.4
+ -  Jinja2 >= 2.3
+ -  Pygments >= 2.0
+--  docutils >= 0.11
++-  docutils < 0.18
+ -  snowballstemmer >= 1.1
+ -  babel >= 1.3
+ -  setuptools / distribute
+ -  Python
+ -  GNU patch (shipped with Sage)
+-
+-
+-Special Update/Build Instructions
+----------------------------------
+-
+--  The script create_grammar_pickle.py creates the file
+-   Grammar2.7.pickle in site-packages/Sphinx-.../sphinx/pycode/. This
+-   helps to avoid race conditions when building the documentation in
+-   parallel.
+-- 
+cgit v1.0-1-gd88e
+
+
+From 25cba02d3e5094b78ffbc66c38687e25caca2681 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Fran=C3=A7ois=20Bissey?= <frp.bissey@gmail.com>
+Date: Mon, 13 Dec 2021 11:20:17 +1300
+Subject: add gentoo distros file
+
+---
+ build/pkgs/sphinx/distros/gentoo.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 build/pkgs/sphinx/distros/gentoo.txt
+
+diff --git a/build/pkgs/sphinx/distros/gentoo.txt b/build/pkgs/sphinx/distros/gentoo.txt
+new file mode 100644
+index 00000000..059e3ae
+--- /dev/null
++++ b/build/pkgs/sphinx/distros/gentoo.txt
+@@ -0,0 +1 @@
++dev-python/sphinx
+-- 
+cgit v1.0-1-gd88e
+
+
+From fc84f82f52b6f05f512cb359ec7c100f93cf8841 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Fran=C3=A7ois=20Bissey?= <frp.bissey@gmail.com>
+Date: Mon, 13 Dec 2021 11:23:48 +1300
+Subject: Add required new option for sphinx 4.3+ as per Tobias Hansen's
+ original patch
+
+---
+ src/sage/docs/conf.py | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/sage/docs/conf.py b/src/sage/docs/conf.py
+index f2efb65..0caac35 100644
+--- a/src/sage/docs/conf.py
++++ b/src/sage/docs/conf.py
+@@ -911,6 +911,7 @@ def setup(app):
+     if app.srcdir.startswith(SAGE_DOC_SRC):
+         app.add_config_value('intersphinx_mapping', {}, False)
+         app.add_config_value('intersphinx_cache_limit', 5, False)
++        app.add_config_value('intersphinx_disabled_reftypes', [], False)
+         app.connect('config-inited', set_intersphinx_mappings)
+         app.connect('builder-inited', intersphinx.load_mappings)
+         # We do *not* fully initialize intersphinx since we call it by hand
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/trac-33020-update_ipykernel_to_6.6.0-715277cfadd7b3872ad6f7001fe84fb7568c947c.patch b/srcpkgs/sagemath/patches/trac-33020-update_ipykernel_to_6.6.0-715277cfadd7b3872ad6f7001fe84fb7568c947c.patch
new file mode 100644
index 000000000000..9cb11b381ea2
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-33020-update_ipykernel_to_6.6.0-715277cfadd7b3872ad6f7001fe84fb7568c947c.patch
@@ -0,0 +1,84 @@
+From 715277cfadd7b3872ad6f7001fe84fb7568c947c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Mon, 13 Dec 2021 18:04:04 -0300
+Subject: update ipykernel and make debugpy optional
+
+ - update ipykernel to 6.6.0, for which debugpy is optional
+ - patch out debugpy from pyproject.toml and setup.py
+ - make debugpy optional for sagemath
+---
+ build/pkgs/debugpy/type                             |  2 +-
+ build/pkgs/ipykernel/checksums.ini                  |  6 +++---
+ build/pkgs/ipykernel/dependencies                   |  2 +-
+ build/pkgs/ipykernel/package-version.txt            |  2 +-
+ .../ipykernel/patches/debugpy-make-optional.patch   | 21 +++++++++++++++++++++
+ 5 files changed, 27 insertions(+), 6 deletions(-)
+ create mode 100644 build/pkgs/ipykernel/patches/debugpy-make-optional.patch
+
+diff --git a/build/pkgs/debugpy/type b/build/pkgs/debugpy/type
+index a6a7b9c..134d9bc 100644
+--- a/build/pkgs/debugpy/type
++++ b/build/pkgs/debugpy/type
+@@ -1 +1 @@
+-standard
++optional
+diff --git a/build/pkgs/ipykernel/checksums.ini b/build/pkgs/ipykernel/checksums.ini
+index ca1302e..724eec8 100644
+--- a/build/pkgs/ipykernel/checksums.ini
++++ b/build/pkgs/ipykernel/checksums.ini
+@@ -1,5 +1,5 @@
+ tarball=ipykernel-VERSION.tar.gz
+-sha1=2c2aa0e929bfd0e694da6b45d2de846a0a5d2812
+-md5=78797cb2389d8f131c75280f808aac15
+-cksum=1454395629
++sha1=5a5cf7f8c0c02d0c0cc5fe3e0fe7481a86de6552
++md5=f940975eb00de793695c386ad3a8800c
++cksum=597841676
+ upstream_url=https://pypi.io/packages/source/i/ipykernel/ipykernel-VERSION.tar.gz
+diff --git a/build/pkgs/ipykernel/dependencies b/build/pkgs/ipykernel/dependencies
+index eec7126..5b3708a 100644
+--- a/build/pkgs/ipykernel/dependencies
++++ b/build/pkgs/ipykernel/dependencies
+@@ -1,4 +1,4 @@
+-$(PYTHON) ipython_genutils importlib_metadata argcomplete debugpy matplotlib_inline ipython jupyter_client tornado appnope traitlets | $(PYTHON_TOOLCHAIN)
++$(PYTHON) ipython_genutils importlib_metadata argcomplete matplotlib_inline ipython jupyter_client tornado appnope traitlets | $(PYTHON_TOOLCHAIN)
+ 
+ ----------
+ All lines of this file are ignored except the first.
+diff --git a/build/pkgs/ipykernel/package-version.txt b/build/pkgs/ipykernel/package-version.txt
+index a194c18..826f5ce 100644
+--- a/build/pkgs/ipykernel/package-version.txt
++++ b/build/pkgs/ipykernel/package-version.txt
+@@ -1 +1 @@
+-6.5.1
++6.6.0
+diff --git a/build/pkgs/ipykernel/patches/debugpy-make-optional.patch b/build/pkgs/ipykernel/patches/debugpy-make-optional.patch
+new file mode 100644
+index 00000000..308e4dd
+--- /dev/null
++++ b/build/pkgs/ipykernel/patches/debugpy-make-optional.patch
+@@ -0,0 +1,21 @@
++--- a/pyproject.toml	2021-12-01 10:23:30.000000000 -0300
+++++ b/pyproject.toml	2021-12-13 18:01:36.239921204 -0300
++@@ -3,7 +3,6 @@
++ requires=[
++   "setuptools",
++   "wheel",
++-  "debugpy",
++   "ipython>=5",
++   "jupyter_core>=4.2",
++   "jupyter_client",
++diff -ruN a/setup.py b/setup.py
++--- a/setup.py	2021-12-01 10:23:09.000000000 -0300
+++++ b/setup.py	2021-12-13 18:01:40.112873823 -0300
++@@ -63,7 +63,6 @@
++     install_requires=[
++         'importlib-metadata<5;python_version<"3.8.0"',
++         'argcomplete>=1.12.3;python_version<"3.8.0"',
++-        'debugpy>=1.0.0,<2.0',
++         'ipython>=7.23.1',
++         'traitlets>=5.1.0,<6.0',
++         'jupyter_client<8.0',
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/trac-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch b/srcpkgs/sagemath/patches/trac-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch
new file mode 100644
index 000000000000..3ae6fe01822d
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-33040-update_matplotlib_to_3.5-d865a54526829b79d5d236a40f83ddc6ce7b2696.patch
@@ -0,0 +1,1196 @@
+From 6cd3723646a516b27864fbb6669d2a9a25fd11e0 Mon Sep 17 00:00:00 2001
+From: Antonio Rojas <arojas@archlinux.org>
+Date: Tue, 30 Mar 2021 20:05:47 +0200
+Subject: Update matplotlib to 3.4.0
+
+---
+ build/pkgs/matplotlib/checksums.ini       | 6 +++---
+ build/pkgs/matplotlib/package-version.txt | 2 +-
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/build/pkgs/matplotlib/checksums.ini b/build/pkgs/matplotlib/checksums.ini
+index 75fbea5..96f2344 100644
+--- a/build/pkgs/matplotlib/checksums.ini
++++ b/build/pkgs/matplotlib/checksums.ini
+@@ -1,5 +1,5 @@
+ tarball=matplotlib-VERSION.tar.gz
+-sha1=a26c32c19f39d88ad6ae67e774b677c075a36eac
+-md5=0b48f34ec623e765a1bda15924ce0b56
+-cksum=3626490879
++sha1=e29cc841d52b3df2c080b05b4019a9fe7d092c13
++md5=556395cc4ef4306025ce5138b9b68dd3
++cksum=3473305609
+ upstream_url=https://pypi.io/packages/source/m/matplotlib/matplotlib-VERSION.tar.gz
+diff --git a/build/pkgs/matplotlib/package-version.txt b/build/pkgs/matplotlib/package-version.txt
+index a0891f5..1809198 100644
+--- a/build/pkgs/matplotlib/package-version.txt
++++ b/build/pkgs/matplotlib/package-version.txt
+@@ -1 +1 @@
+-3.3.4
++3.4.0
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4d742f220a3b0479afab1675d4bea5a39b944f7a Mon Sep 17 00:00:00 2001
+From: Antonio Rojas <arojas@archlinux.org>
+Date: Wed, 12 May 2021 08:23:25 +0200
+Subject: Update matplotlib to 3.4.2
+
+---
+ build/pkgs/matplotlib/checksums.ini       | 6 +++---
+ build/pkgs/matplotlib/package-version.txt | 2 +-
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/build/pkgs/matplotlib/checksums.ini b/build/pkgs/matplotlib/checksums.ini
+index 96f2344..9a32546 100644
+--- a/build/pkgs/matplotlib/checksums.ini
++++ b/build/pkgs/matplotlib/checksums.ini
+@@ -1,5 +1,5 @@
+ tarball=matplotlib-VERSION.tar.gz
+-sha1=e29cc841d52b3df2c080b05b4019a9fe7d092c13
+-md5=556395cc4ef4306025ce5138b9b68dd3
+-cksum=3473305609
++sha1=1a8a2b31fe5eaf70ea6d687dc05be3bd5cc595e5
++md5=e34749a5f0661b8af74a1dc327fb74f6
++cksum=1488332141
+ upstream_url=https://pypi.io/packages/source/m/matplotlib/matplotlib-VERSION.tar.gz
+diff --git a/build/pkgs/matplotlib/package-version.txt b/build/pkgs/matplotlib/package-version.txt
+index 1809198..4d9d11c 100644
+--- a/build/pkgs/matplotlib/package-version.txt
++++ b/build/pkgs/matplotlib/package-version.txt
+@@ -1 +1 @@
+-3.4.0
++3.4.2
+-- 
+cgit v1.0-1-gd88e
+
+
+From e406102e240c8931f24caf5f354266f76f4a91d6 Mon Sep 17 00:00:00 2001
+From: Dima Pasechnik <dima@pasechnik.info>
+Date: Sat, 17 Jul 2021 11:34:20 +0100
+Subject: qhull is a dependency
+
+---
+ build/pkgs/matplotlib/dependencies | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/build/pkgs/matplotlib/dependencies b/build/pkgs/matplotlib/dependencies
+index 542dab4..e32a563 100644
+--- a/build/pkgs/matplotlib/dependencies
++++ b/build/pkgs/matplotlib/dependencies
+@@ -1,4 +1,4 @@
+-$(PYTHON) numpy freetype pillow dateutil pyparsing tornado six cycler | $(PYTHON_TOOLCHAIN) pytz kiwisolver certifi
++$(PYTHON) numpy freetype pillow dateutil pyparsing tornado six cycler qhull | $(PYTHON_TOOLCHAIN) pytz kiwisolver certifi
+ 
+ ----------
+ All lines of this file are ignored except the first.
+-- 
+cgit v1.0-1-gd88e
+
+
+From 51ba6f3cd21f83b1f70faaf17a97490ab12d97a9 Mon Sep 17 00:00:00 2001
+From: Dima Pasechnik <dima@pasechnik.info>
+Date: Sat, 17 Jul 2021 11:49:33 +0100
+Subject: qhull standard, as a dep of matplotlib
+
+matplotlib has qhull as a dependency now
+---
+ build/pkgs/qhull/type | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/build/pkgs/qhull/type b/build/pkgs/qhull/type
+index 134d9bc..a6a7b9c 100644
+--- a/build/pkgs/qhull/type
++++ b/build/pkgs/qhull/type
+@@ -1 +1 @@
+-optional
++standard
+-- 
+cgit v1.0-1-gd88e
+
+
+From 86698214e0d42b3a7a1b935da6f7723122503785 Mon Sep 17 00:00:00 2001
+From: Dima Pasechnik <dima@pasechnik.info>
+Date: Mon, 19 Jul 2021 12:42:13 +0100
+Subject: do not vendor ghull, unconditionally
+
+---
+ build/pkgs/matplotlib/make-setup-config.py | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/build/pkgs/matplotlib/make-setup-config.py b/build/pkgs/matplotlib/make-setup-config.py
+index b4d5d05..2a53eab 100644
+--- a/build/pkgs/matplotlib/make-setup-config.py
++++ b/build/pkgs/matplotlib/make-setup-config.py
+@@ -9,8 +9,7 @@ config.set('directories', 'basedirlist', os.environ['SAGE_LOCAL'])
+ 
+ config.add_section('libs')
+ config.set('libs', 'system_freetype', 'True')
+-if pkgconfig.installed('qhull', '>= 7.2.0'):
+-    config.set('libs', 'system_qhull', 'True')
++config.set('libs', 'system_qhull', 'True')
+ # lto is problematic if we mix libraries from the OS with our own libraries,
+ # which are not necessarily compiled with the same gcc version
+ # https://trac.sagemath.org/ticket/27754
+-- 
+cgit v1.0-1-gd88e
+
+
+From f999e9b913e4e6a69398318b0651a82ceb9e0e06 Mon Sep 17 00:00:00 2001
+From: Dima Pasechnik <dima@pasechnik.info>
+Date: Wed, 28 Jul 2021 11:31:30 +0100
+Subject: upstream patch to recitfy docbuild problem
+
+see https://github.com/matplotlib/matplotlib/pull/20748
+and trac #32262
+---
+ build/pkgs/matplotlib/package-version.txt                 |  2 +-
+ build/pkgs/matplotlib/patches/create_staticifneeded.patch | 10 ++++++++++
+ 2 files changed, 11 insertions(+), 1 deletion(-)
+ create mode 100644 build/pkgs/matplotlib/patches/create_staticifneeded.patch
+
+diff --git a/build/pkgs/matplotlib/package-version.txt b/build/pkgs/matplotlib/package-version.txt
+index 4d9d11c..09d7341 100644
+--- a/build/pkgs/matplotlib/package-version.txt
++++ b/build/pkgs/matplotlib/package-version.txt
+@@ -1 +1 @@
+-3.4.2
++3.4.2.p1
+diff --git a/build/pkgs/matplotlib/patches/create_staticifneeded.patch b/build/pkgs/matplotlib/patches/create_staticifneeded.patch
+new file mode 100644
+index 00000000..7e6ed2f
+--- /dev/null
++++ b/build/pkgs/matplotlib/patches/create_staticifneeded.patch
+@@ -0,0 +1,10 @@
++diff --git a/lib/matplotlib/sphinxext/plot_directive.py b/lib/matplotlib/sphinxext/plot_directive.py
++index d59d9bdd71bf..d40e0c58b4a5 100644
++--- a/lib/matplotlib/sphinxext/plot_directive.py
+++++ b/lib/matplotlib/sphinxext/plot_directive.py
++@@ -266,6 +266,7 @@ def _copy_css_file(app, exc):
++     if exc is None and app.builder.format == 'html':
++         src = cbook._get_data_path('plot_directive/plot_directive.css')
++         dst = app.outdir / Path('_static')
+++        dst.mkdir(exist_ok=True)
++         shutil.copy(src, dst)
+-- 
+cgit v1.0-1-gd88e
+
+
+From af761fa8ac78452b92fa9ff0a1dbaf9bfe787ac7 Mon Sep 17 00:00:00 2001
+From: Dima Pasechnik <dima@pasechnik.info>
+Date: Wed, 8 Sep 2021 13:33:51 +0100
+Subject: update to 3.4.3
+
+---
+ build/pkgs/matplotlib/checksums.ini       | 6 +++---
+ build/pkgs/matplotlib/package-version.txt | 2 +-
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/build/pkgs/matplotlib/checksums.ini b/build/pkgs/matplotlib/checksums.ini
+index 9a32546..2783080 100644
+--- a/build/pkgs/matplotlib/checksums.ini
++++ b/build/pkgs/matplotlib/checksums.ini
+@@ -1,5 +1,5 @@
+ tarball=matplotlib-VERSION.tar.gz
+-sha1=1a8a2b31fe5eaf70ea6d687dc05be3bd5cc595e5
+-md5=e34749a5f0661b8af74a1dc327fb74f6
+-cksum=1488332141
++sha1=764fb3c673f45bedb472bc81c63b9c36f7973c46
++md5=6858958370a26cccfa81abc7b6dd3622
++cksum=2317464343
+ upstream_url=https://pypi.io/packages/source/m/matplotlib/matplotlib-VERSION.tar.gz
+diff --git a/build/pkgs/matplotlib/package-version.txt b/build/pkgs/matplotlib/package-version.txt
+index 09d7341..6cb9d3d 100644
+--- a/build/pkgs/matplotlib/package-version.txt
++++ b/build/pkgs/matplotlib/package-version.txt
+@@ -1 +1 @@
+-3.4.2.p1
++3.4.3
+-- 
+cgit v1.0-1-gd88e
+
+
+From 24b7a9a9c19bcfc32e1975012b2fad55736dc0ec Mon Sep 17 00:00:00 2001
+From: Dima Pasechnik <dima@pasechnik.info>
+Date: Wed, 8 Sep 2021 14:04:48 +0100
+Subject: Revert "upstream patch to recitfy docbuild problem"
+
+This reverts commit 13912acb0e04c6548e6914f8bd40f42fc2d5863c.
+---
+ build/pkgs/matplotlib/patches/create_staticifneeded.patch | 10 ----------
+ 1 file changed, 10 deletions(-)
+ delete mode 100644 build/pkgs/matplotlib/patches/create_staticifneeded.patch
+
+diff --git a/build/pkgs/matplotlib/patches/create_staticifneeded.patch b/build/pkgs/matplotlib/patches/create_staticifneeded.patch
+deleted file mode 100644
+index 7e6ed2f..00000000
+--- a/build/pkgs/matplotlib/patches/create_staticifneeded.patch
++++ /dev/null
+@@ -1,10 +0,0 @@
+-diff --git a/lib/matplotlib/sphinxext/plot_directive.py b/lib/matplotlib/sphinxext/plot_directive.py
+-index d59d9bdd71bf..d40e0c58b4a5 100644
+---- a/lib/matplotlib/sphinxext/plot_directive.py
+-+++ b/lib/matplotlib/sphinxext/plot_directive.py
+-@@ -266,6 +266,7 @@ def _copy_css_file(app, exc):
+-     if exc is None and app.builder.format == 'html':
+-         src = cbook._get_data_path('plot_directive/plot_directive.css')
+-         dst = app.outdir / Path('_static')
+-+        dst.mkdir(exist_ok=True)
+-         shutil.copy(src, dst)
+-- 
+cgit v1.0-1-gd88e
+
+
+From 42435f4aee9cd901dba119255a02247055b7dc80 Mon Sep 17 00:00:00 2001
+From: Dima Pasechnik <dima@pasechnik.info>
+Date: Sun, 19 Sep 2021 15:51:34 +0100
+Subject: add gfortran to _prereq/distros/*
+
+---
+ build/pkgs/_prereq/distros/arch.txt      | 1 +
+ build/pkgs/_prereq/distros/conda.txt     | 1 +
+ build/pkgs/_prereq/distros/cygwin.txt    | 1 +
+ build/pkgs/_prereq/distros/debian.txt    | 1 +
+ build/pkgs/_prereq/distros/fedora.txt    | 1 +
+ build/pkgs/_prereq/distros/freebsd.txt   | 1 +
+ build/pkgs/_prereq/distros/homebrew.txt  | 3 +--
+ build/pkgs/_prereq/distros/macports.txt  | 1 +
+ build/pkgs/_prereq/distros/opensuse.txt  | 1 +
+ build/pkgs/_prereq/distros/slackware.txt | 1 +
+ build/pkgs/_prereq/distros/void.txt      | 1 +
+ 11 files changed, 11 insertions(+), 2 deletions(-)
+ create mode 100644 build/pkgs/_prereq/distros/macports.txt
+
+diff --git a/build/pkgs/_prereq/distros/arch.txt b/build/pkgs/_prereq/distros/arch.txt
+index 9b9bf09..f43cab4 100644
+--- a/build/pkgs/_prereq/distros/arch.txt
++++ b/build/pkgs/_prereq/distros/arch.txt
+@@ -6,5 +6,6 @@ python # system python for bootstrapping the build
+ tar
+ bc
+ gcc
++gcc-fortran
+ # Needed for 4ti2:
+ which
+diff --git a/build/pkgs/_prereq/distros/conda.txt b/build/pkgs/_prereq/distros/conda.txt
+index a02a39e..0e66d82 100644
+--- a/build/pkgs/_prereq/distros/conda.txt
++++ b/build/pkgs/_prereq/distros/conda.txt
+@@ -1,4 +1,5 @@
+ compilers
++fortran-compiler
+ make
+ m4
+ perl
+diff --git a/build/pkgs/_prereq/distros/cygwin.txt b/build/pkgs/_prereq/distros/cygwin.txt
+index 635afe8..fc0304d 100644
+--- a/build/pkgs/_prereq/distros/cygwin.txt
++++ b/build/pkgs/_prereq/distros/cygwin.txt
+@@ -19,6 +19,7 @@ perl-ExtUtils-MakeMaker
+ tar
+ gcc-core
+ gcc-g++
++gcc-fortran
+ # Needed according to embray at https://trac.sagemath.org/ticket/26964:
+ # The need for which comes [...] from MPIR's configure script
+ findutils
+diff --git a/build/pkgs/_prereq/distros/debian.txt b/build/pkgs/_prereq/distros/debian.txt
+index 50be6ac..c348ee3 100644
+--- a/build/pkgs/_prereq/distros/debian.txt
++++ b/build/pkgs/_prereq/distros/debian.txt
+@@ -26,5 +26,6 @@ gcc
+ # configure: error: in `/sage':
+ # configure: error: C++ preprocessor "/lib/cpp" fails sanity check
+ g++
++gfortran
+ # Needed if we download some packages from a https upstream URL
+ ca-certificates
+diff --git a/build/pkgs/_prereq/distros/fedora.txt b/build/pkgs/_prereq/distros/fedora.txt
+index a82e29a..d5a5ae7 100644
+--- a/build/pkgs/_prereq/distros/fedora.txt
++++ b/build/pkgs/_prereq/distros/fedora.txt
+@@ -26,6 +26,7 @@ gcc
+ # configure: error: in `/sage':
+ # configure: error: C++ preprocessor "/lib/cpp" fails sanity check
+ gcc-c++
++gcc-gfortran
+ # Needed according to embray at https://trac.sagemath.org/ticket/26964:
+ # The need for which comes [...] from MPIR's configure script
+ findutils
+diff --git a/build/pkgs/_prereq/distros/freebsd.txt b/build/pkgs/_prereq/distros/freebsd.txt
+index cc708cc..ec26136 100644
+--- a/build/pkgs/_prereq/distros/freebsd.txt
++++ b/build/pkgs/_prereq/distros/freebsd.txt
+@@ -17,3 +17,4 @@ automake
+ bash
+ dash
+ python # python metaport for bootstrapping the build
++lang/gcc9 # gfortran
+diff --git a/build/pkgs/_prereq/distros/homebrew.txt b/build/pkgs/_prereq/distros/homebrew.txt
+index 863c22a..f537c17 100644
+--- a/build/pkgs/_prereq/distros/homebrew.txt
++++ b/build/pkgs/_prereq/distros/homebrew.txt
+@@ -8,5 +8,4 @@
+ # for use in "sage -info SPKG".
+ #
+ # Everything on a line after a # character is ignored.
+-
+-# No packages needed
++gcc
+diff --git a/build/pkgs/_prereq/distros/macports.txt b/build/pkgs/_prereq/distros/macports.txt
+new file mode 100644
+index 00000000..c2878ad
+--- /dev/null
++++ b/build/pkgs/_prereq/distros/macports.txt
+@@ -0,0 +1 @@
++gcc10 +gfortran
+diff --git a/build/pkgs/_prereq/distros/opensuse.txt b/build/pkgs/_prereq/distros/opensuse.txt
+index 070f456..959ab26 100644
+--- a/build/pkgs/_prereq/distros/opensuse.txt
++++ b/build/pkgs/_prereq/distros/opensuse.txt
+@@ -19,6 +19,7 @@ which
+ glibc-locale-base
+ gcc
+ gcc-c++
++gcc-fortran
+ # Needed if we download some packages from a https upstream URL
+ ca-certificates
+ # gunzip needed for ppl spkg
+diff --git a/build/pkgs/_prereq/distros/slackware.txt b/build/pkgs/_prereq/distros/slackware.txt
+index a976efe..11ec3b9 100644
+--- a/build/pkgs/_prereq/distros/slackware.txt
++++ b/build/pkgs/_prereq/distros/slackware.txt
+@@ -3,6 +3,7 @@ make
+ guile gc libffi  # dependencies of make
+ "gcc-[0-9]"      # So that slackpkg pattern matching does not pull in all gcc-* packages
+ gcc-g++
++gcc-gfortran
+ libmpc glibc kernel-headers # dependencies of gcc
+ perl
+ m4
+diff --git a/build/pkgs/_prereq/distros/void.txt b/build/pkgs/_prereq/distros/void.txt
+index a2e7644..2769f4d 100644
+--- a/build/pkgs/_prereq/distros/void.txt
++++ b/build/pkgs/_prereq/distros/void.txt
+@@ -7,4 +7,5 @@ python3
+ tar
+ bc
+ gcc
++gcc-fortran
+ which
+-- 
+cgit v1.0-1-gd88e
+
+
+From 8af511c414982483de66a93d84865475b262efc1 Mon Sep 17 00:00:00 2001
+From: Dima Pasechnik <dima@pasechnik.info>
+Date: Tue, 16 Nov 2021 15:47:08 +0000
+Subject: rebase, update deps
+
+---
+ build/pkgs/cycler/checksums.ini           | 1 +
+ build/pkgs/cycler/package-version.txt     | 2 +-
+ build/pkgs/kiwisolver/checksums.ini       | 7 ++++---
+ build/pkgs/kiwisolver/package-version.txt | 2 +-
+ build/pkgs/pytz/SPKG.rst                  | 1 +
+ build/pkgs/pytz/package-version.txt       | 2 +-
+ 6 files changed, 9 insertions(+), 6 deletions(-)
+
+diff --git a/build/pkgs/cycler/checksums.ini b/build/pkgs/cycler/checksums.ini
+index 6c1ffe0..f6d988d 100644
+--- a/build/pkgs/cycler/checksums.ini
++++ b/build/pkgs/cycler/checksums.ini
+@@ -2,3 +2,4 @@ tarball=cycler-VERSION.tar.gz
+ sha1=1bcf4a985a5f414333603f3f70a7deebbaf30439
+ md5=4cb42917ac5007d1cdff6cccfe2d016b
+ cksum=4189438538
++upstream_url=https://github.com/matplotlib/cycler/archive/refs/tags/vVERSION.tar.gz
+diff --git a/build/pkgs/cycler/package-version.txt b/build/pkgs/cycler/package-version.txt
+index db2d863..d9df1bb 100644
+--- a/build/pkgs/cycler/package-version.txt
++++ b/build/pkgs/cycler/package-version.txt
+@@ -1 +1 @@
+-0.10.0.p0
++0.11.0
+diff --git a/build/pkgs/kiwisolver/checksums.ini b/build/pkgs/kiwisolver/checksums.ini
+index 1ca0ba3..fc15fad 100644
+--- a/build/pkgs/kiwisolver/checksums.ini
++++ b/build/pkgs/kiwisolver/checksums.ini
+@@ -1,4 +1,5 @@
+ tarball=kiwisolver-VERSION.tar.gz
+-sha1=093c2348a53fe18d42983ddbd823911b21781928
+-md5=e2a1718b837e2cd001f7c06934616fcd
+-cksum=4236707026
++sha1=61811685031328a8a2a77f45593d8238432ce35e
++md5=98d746f558685c6b6658cefc39be14df
++cksum=1915059157
++upstream_url=https://files.pythonhosted.org/packages/source/k/kiwisolver/kiwisolver-VERSION.tar.gz
+diff --git a/build/pkgs/kiwisolver/package-version.txt b/build/pkgs/kiwisolver/package-version.txt
+index 7dea76e..1892b92 100644
+--- a/build/pkgs/kiwisolver/package-version.txt
++++ b/build/pkgs/kiwisolver/package-version.txt
+@@ -1 +1 @@
+-1.0.1
++1.3.2
+diff --git a/build/pkgs/pytz/SPKG.rst b/build/pkgs/pytz/SPKG.rst
+index 75827d0..199f8df 100644
+--- a/build/pkgs/pytz/SPKG.rst
++++ b/build/pkgs/pytz/SPKG.rst
+@@ -5,6 +5,7 @@ Description
+ -----------
+ 
+ World Timezone Definitions for Python
++See https://pypi.org/project/pytz/
+ 
+ 
+ Special Update/Build Instructions
+diff --git a/build/pkgs/pytz/package-version.txt b/build/pkgs/pytz/package-version.txt
+index d673154..c9c8e05 100644
+--- a/build/pkgs/pytz/package-version.txt
++++ b/build/pkgs/pytz/package-version.txt
+@@ -1 +1 @@
+-2021.1
++2021.3
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5c972e4f1e27382191f268880c5222dc9d687d11 Mon Sep 17 00:00:00 2001
+From: Dima Pasechnik <dima@pasechnik.info>
+Date: Tue, 16 Nov 2021 15:52:31 +0000
+Subject: correct checksum
+
+---
+ build/pkgs/pytz/checksums.ini | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/build/pkgs/pytz/checksums.ini b/build/pkgs/pytz/checksums.ini
+index ede348f..0faabac 100644
+--- a/build/pkgs/pytz/checksums.ini
++++ b/build/pkgs/pytz/checksums.ini
+@@ -1,5 +1,5 @@
+ tarball=pytz-VERSION.tar.gz
+-sha1=738cff9addf39084e5655558482f865dca2c66dd
+-md5=8c849bdf95414fe708a84473e42d4406
+-cksum=1633513953
++sha1=fa6729d40cfa607daee0f40cdab165976ab0e0a3
++md5=d7b7060bbac4970afa2050c139c9fcb6
++cksum=3161093227
+ upstream_url=https://pypi.io/packages/source/p/pytz/pytz-VERSION.tar.gz
+-- 
+cgit v1.0-1-gd88e
+
+
+From 00b677bcc532b75faec7ee8980e25d8ddeb395ae Mon Sep 17 00:00:00 2001
+From: Dima Pasechnik <dima@pasechnik.info>
+Date: Tue, 16 Nov 2021 16:52:32 +0000
+Subject: new dep of kiwisolver, cppy
+
+---
+ build/pkgs/cppy/checksums.ini       | 5 +++++
+ build/pkgs/cppy/package-version.txt | 1 +
+ build/pkgs/cppy/spkg-install.in     | 1 +
+ build/pkgs/cppy/type                | 1 +
+ 4 files changed, 8 insertions(+)
+ create mode 100644 build/pkgs/cppy/checksums.ini
+ create mode 100644 build/pkgs/cppy/package-version.txt
+ create mode 100644 build/pkgs/cppy/spkg-install.in
+ create mode 100644 build/pkgs/cppy/type
+
+diff --git a/build/pkgs/cppy/checksums.ini b/build/pkgs/cppy/checksums.ini
+new file mode 100644
+index 00000000..85eb695
+--- /dev/null
++++ b/build/pkgs/cppy/checksums.ini
+@@ -0,0 +1,5 @@
++tarball=cppy-VERSION.tar.gz
++sha1=61811685031328a8a2a77f45593d8238432ce35e
++md5=98d746f558685c6b6658cefc39be14df
++cksum=1915059157
++upstream_url=https://files.pythonhosted.org/packages/source/c/cppy/cppy-VERSION.tar.gz
+diff --git a/build/pkgs/cppy/package-version.txt b/build/pkgs/cppy/package-version.txt
+new file mode 100644
+index 00000000..9084fa2
+--- /dev/null
++++ b/build/pkgs/cppy/package-version.txt
+@@ -0,0 +1 @@
++1.1.0
+diff --git a/build/pkgs/cppy/spkg-install.in b/build/pkgs/cppy/spkg-install.in
+new file mode 100644
+index 00000000..deba1bb
+--- /dev/null
++++ b/build/pkgs/cppy/spkg-install.in
+@@ -0,0 +1 @@
++cd src && sdh_pip_install .
+diff --git a/build/pkgs/cppy/type b/build/pkgs/cppy/type
+new file mode 100644
+index 00000000..a6a7b9c
+--- /dev/null
++++ b/build/pkgs/cppy/type
+@@ -0,0 +1 @@
++standard
+-- 
+cgit v1.0-1-gd88e
+
+
+From 48b7ec3849754abb1a526887a85f6fdd4e6a4d30 Mon Sep 17 00:00:00 2001
+From: Dima Pasechnik <dima@pasechnik.info>
+Date: Tue, 16 Nov 2021 16:56:36 +0000
+Subject: update matplotlib deps
+
+---
+ build/pkgs/certifi/checksums.ini         | 6 +++---
+ build/pkgs/certifi/package-version.txt   | 2 +-
+ build/pkgs/cppy/checksums.ini            | 6 +++---
+ build/pkgs/cppy/dependencies             | 5 +++++
+ build/pkgs/cycler/checksums.ini          | 6 +++---
+ build/pkgs/dateutil/checksums.ini        | 7 ++++---
+ build/pkgs/dateutil/package-version.txt  | 2 +-
+ build/pkgs/kiwisolver/dependencies       | 2 +-
+ build/pkgs/pillow/checksums.ini          | 6 +++---
+ build/pkgs/pillow/package-version.txt    | 2 +-
+ build/pkgs/pyparsing/checksums.ini       | 7 ++++---
+ build/pkgs/pyparsing/package-version.txt | 2 +-
+ 12 files changed, 30 insertions(+), 23 deletions(-)
+ create mode 100644 build/pkgs/cppy/dependencies
+
+diff --git a/build/pkgs/certifi/checksums.ini b/build/pkgs/certifi/checksums.ini
+index bc548e0..87d8378 100644
+--- a/build/pkgs/certifi/checksums.ini
++++ b/build/pkgs/certifi/checksums.ini
+@@ -1,5 +1,5 @@
+ tarball=certifi-VERSION.tar.gz
+-sha1=93145f31550b5e11dc323085d75a227856b93fd4
+-md5=4b38238b7305fcb3ffbc4368be4e8845
+-cksum=3424910066
++sha1=b13e22d55867e2ca5f92e5289cfdc21ba6e343aa
++md5=880ed9e5d04aff8f46f5ff82a3a3e395
++cksum=613361382
+ upstream_url=https://pypi.io/packages/source/c/certifi/certifi-VERSION.tar.gz
+diff --git a/build/pkgs/certifi/package-version.txt b/build/pkgs/certifi/package-version.txt
+index 6b59105..6b1fb39 100644
+--- a/build/pkgs/certifi/package-version.txt
++++ b/build/pkgs/certifi/package-version.txt
+@@ -1 +1 @@
+-2021.5.30
++2021.10.8
+diff --git a/build/pkgs/cppy/checksums.ini b/build/pkgs/cppy/checksums.ini
+index 85eb695..5c78167 100644
+--- a/build/pkgs/cppy/checksums.ini
++++ b/build/pkgs/cppy/checksums.ini
+@@ -1,5 +1,5 @@
+ tarball=cppy-VERSION.tar.gz
+-sha1=61811685031328a8a2a77f45593d8238432ce35e
+-md5=98d746f558685c6b6658cefc39be14df
+-cksum=1915059157
++sha1=3af4f5f14ef1f9b49d7457e2fa5c241c721db29c
++md5=2110891d75aa12551deebba1603428c6
++cksum=793876648
+ upstream_url=https://files.pythonhosted.org/packages/source/c/cppy/cppy-VERSION.tar.gz
+diff --git a/build/pkgs/cppy/dependencies b/build/pkgs/cppy/dependencies
+new file mode 100644
+index 00000000..15df0c4
+--- /dev/null
++++ b/build/pkgs/cppy/dependencies
+@@ -0,0 +1,5 @@
++$(PYTHON) | $(PYTHON_TOOLCHAIN)
++
++----------
++All lines of this file are ignored except the first.
++It is copied by SAGE_ROOT/build/make/install into SAGE_ROOT/build/make/Makefile.
+diff --git a/build/pkgs/cycler/checksums.ini b/build/pkgs/cycler/checksums.ini
+index f6d988d..8883ddd 100644
+--- a/build/pkgs/cycler/checksums.ini
++++ b/build/pkgs/cycler/checksums.ini
+@@ -1,5 +1,5 @@
+ tarball=cycler-VERSION.tar.gz
+-sha1=1bcf4a985a5f414333603f3f70a7deebbaf30439
+-md5=4cb42917ac5007d1cdff6cccfe2d016b
+-cksum=4189438538
++sha1=ea144185cf1d54d7415e3c66d705d9a232e57da5
++md5=cf3b4846fded12fa4d2a7a291a5d6e13
++cksum=3626319704
+ upstream_url=https://github.com/matplotlib/cycler/archive/refs/tags/vVERSION.tar.gz
+diff --git a/build/pkgs/dateutil/checksums.ini b/build/pkgs/dateutil/checksums.ini
+index e08ee45..20fbeb6 100644
+--- a/build/pkgs/dateutil/checksums.ini
++++ b/build/pkgs/dateutil/checksums.ini
+@@ -1,4 +1,5 @@
+ tarball=python-dateutil-VERSION.tar.gz
+-sha1=bd26127e57f83a10f656b62c46524c15aeb844dd
+-md5=f2a1d4b680b297b367a974664ca3a4f6
+-cksum=675236266
++sha1=c2ba10c775b7a52a4b57cac4d4110a0c0f812a82
++md5=5970010bb72452344df3d76a10281b65
++cksum=3093929984
++upstream_url=https://files.pythonhosted.org/packages/source/p/python-dateutil/python-dateutil-VERSION.tar.gz
+diff --git a/build/pkgs/dateutil/package-version.txt b/build/pkgs/dateutil/package-version.txt
+index dbe5900..1817afe 100644
+--- a/build/pkgs/dateutil/package-version.txt
++++ b/build/pkgs/dateutil/package-version.txt
+@@ -1 +1 @@
+-2.8.1
++2.8.2
+diff --git a/build/pkgs/kiwisolver/dependencies b/build/pkgs/kiwisolver/dependencies
+index 15df0c4..80b9352 100644
+--- a/build/pkgs/kiwisolver/dependencies
++++ b/build/pkgs/kiwisolver/dependencies
+@@ -1,4 +1,4 @@
+-$(PYTHON) | $(PYTHON_TOOLCHAIN)
++$(PYTHON) cppy | $(PYTHON_TOOLCHAIN)
+ 
+ ----------
+ All lines of this file are ignored except the first.
+diff --git a/build/pkgs/pillow/checksums.ini b/build/pkgs/pillow/checksums.ini
+index 7adfee1..71d2e39 100644
+--- a/build/pkgs/pillow/checksums.ini
++++ b/build/pkgs/pillow/checksums.ini
+@@ -1,5 +1,5 @@
+ tarball=Pillow-VERSION.tar.gz
+-sha1=2c972f30581da0c58edb1e2bed420c2b8f6fd216
+-md5=14ce2c5d19369e335c331c8f529ecf87
+-cksum=976804255
++sha1=ca8d057aec64ccd0804044bc71c17921afbe2e4e
++md5=7a1eb5a250c7ccbd549a89e16404f09f
++cksum=555919456
+ upstream_url=https://pypi.io/packages/source/p/pillow/Pillow-VERSION.tar.gz
+diff --git a/build/pkgs/pillow/package-version.txt b/build/pkgs/pillow/package-version.txt
+index 6b409d9..a2f28f4 100644
+--- a/build/pkgs/pillow/package-version.txt
++++ b/build/pkgs/pillow/package-version.txt
+@@ -1 +1 @@
+-8.1.2
++8.4.0
+diff --git a/build/pkgs/pyparsing/checksums.ini b/build/pkgs/pyparsing/checksums.ini
+index 30aa3fa..d3c3d9b 100644
+--- a/build/pkgs/pyparsing/checksums.ini
++++ b/build/pkgs/pyparsing/checksums.ini
+@@ -1,4 +1,5 @@
+ tarball=pyparsing-VERSION.tar.gz
+-sha1=ca8d892c93fe2d54ea5e6f31c5798e40c58e8667
+-md5=f0953e47a0112f7a65aec2305ffdf7b4
+-cksum=2411150047
++sha1=9c25e076bcf191734a44b85d1eb5d8c3324894c6
++md5=2f5fad6c8e99ac2562ab08ad9e45b195
++cksum=421409881
++upstream_url=https://files.pythonhosted.org/packages/source/p/pyparsing/pyparsing-VERSION.tar.gz
+diff --git a/build/pkgs/pyparsing/package-version.txt b/build/pkgs/pyparsing/package-version.txt
+index e30309f..818bd47 100644
+--- a/build/pkgs/pyparsing/package-version.txt
++++ b/build/pkgs/pyparsing/package-version.txt
+@@ -1 +1 @@
+-2.4.7
++3.0.6
+-- 
+cgit v1.0-1-gd88e
+
+
+From 26910e65f5357fc2f6505440fccc718a52908872 Mon Sep 17 00:00:00 2001
+From: Dima Pasechnik <dima@pasechnik.info>
+Date: Tue, 16 Nov 2021 17:48:55 +0000
+Subject: fix SPKG.rst's for cppy and kiwisolver
+
+---
+ build/pkgs/cppy/SPKG.rst       | 22 ++++++++++++++++++++++
+ build/pkgs/kiwisolver/SPKG.rst |  6 ------
+ 2 files changed, 22 insertions(+), 6 deletions(-)
+ create mode 100644 build/pkgs/cppy/SPKG.rst
+
+diff --git a/build/pkgs/cppy/SPKG.rst b/build/pkgs/cppy/SPKG.rst
+new file mode 100644
+index 00000000..a10d0e1
+--- /dev/null
++++ b/build/pkgs/cppy/SPKG.rst
+@@ -0,0 +1,22 @@
++cppy: C++ headers for C extension development
++===========================================================================
++
++Description
++-----------
++
++From: https://pypi.org/project/cppy/
++
++A small C++ header library which makes it easier to write Python extension
++modules. The primary feature is a PyObject smart pointer which automatically
++handles reference counting and provides convenience methods for performing
++common object operations.
++
++License
++-------
++
++Modified BSD 3-Clause-License
++
++Upstream Contact
++----------------
++
++https://github.com/nucleic/cppy
+diff --git a/build/pkgs/kiwisolver/SPKG.rst b/build/pkgs/kiwisolver/SPKG.rst
+index afaccda..f461bf0 100644
+--- a/build/pkgs/kiwisolver/SPKG.rst
++++ b/build/pkgs/kiwisolver/SPKG.rst
+@@ -29,9 +29,3 @@ Upstream Contact
+ ----------------
+ 
+ https://github.com/nucleic/kiwi
+-
+-Dependencies
+-------------
+-
+--  python
+--  setuptools
+-- 
+cgit v1.0-1-gd88e
+
+
+From aedaf93a51ee4bd69cf61b7c999940d6990b911c Mon Sep 17 00:00:00 2001
+From: Dima Pasechnik <dima@pasechnik.info>
+Date: Tue, 16 Nov 2021 17:58:07 +0000
+Subject: Revert "add gfortran to _prereq/distros/*"
+
+This reverts commit 42435f4aee9cd901dba119255a02247055b7dc80.
+---
+ build/pkgs/_prereq/distros/arch.txt      | 1 -
+ build/pkgs/_prereq/distros/conda.txt     | 1 -
+ build/pkgs/_prereq/distros/cygwin.txt    | 1 -
+ build/pkgs/_prereq/distros/debian.txt    | 1 -
+ build/pkgs/_prereq/distros/fedora.txt    | 1 -
+ build/pkgs/_prereq/distros/freebsd.txt   | 1 -
+ build/pkgs/_prereq/distros/homebrew.txt  | 3 ++-
+ build/pkgs/_prereq/distros/macports.txt  | 1 -
+ build/pkgs/_prereq/distros/opensuse.txt  | 1 -
+ build/pkgs/_prereq/distros/slackware.txt | 1 -
+ build/pkgs/_prereq/distros/void.txt      | 1 -
+ 11 files changed, 2 insertions(+), 11 deletions(-)
+ delete mode 100644 build/pkgs/_prereq/distros/macports.txt
+
+diff --git a/build/pkgs/_prereq/distros/arch.txt b/build/pkgs/_prereq/distros/arch.txt
+index f43cab4..9b9bf09 100644
+--- a/build/pkgs/_prereq/distros/arch.txt
++++ b/build/pkgs/_prereq/distros/arch.txt
+@@ -6,6 +6,5 @@ python # system python for bootstrapping the build
+ tar
+ bc
+ gcc
+-gcc-fortran
+ # Needed for 4ti2:
+ which
+diff --git a/build/pkgs/_prereq/distros/conda.txt b/build/pkgs/_prereq/distros/conda.txt
+index 0e66d82..a02a39e 100644
+--- a/build/pkgs/_prereq/distros/conda.txt
++++ b/build/pkgs/_prereq/distros/conda.txt
+@@ -1,5 +1,4 @@
+ compilers
+-fortran-compiler
+ make
+ m4
+ perl
+diff --git a/build/pkgs/_prereq/distros/cygwin.txt b/build/pkgs/_prereq/distros/cygwin.txt
+index fc0304d..635afe8 100644
+--- a/build/pkgs/_prereq/distros/cygwin.txt
++++ b/build/pkgs/_prereq/distros/cygwin.txt
+@@ -19,7 +19,6 @@ perl-ExtUtils-MakeMaker
+ tar
+ gcc-core
+ gcc-g++
+-gcc-fortran
+ # Needed according to embray at https://trac.sagemath.org/ticket/26964:
+ # The need for which comes [...] from MPIR's configure script
+ findutils
+diff --git a/build/pkgs/_prereq/distros/debian.txt b/build/pkgs/_prereq/distros/debian.txt
+index c348ee3..50be6ac 100644
+--- a/build/pkgs/_prereq/distros/debian.txt
++++ b/build/pkgs/_prereq/distros/debian.txt
+@@ -26,6 +26,5 @@ gcc
+ # configure: error: in `/sage':
+ # configure: error: C++ preprocessor "/lib/cpp" fails sanity check
+ g++
+-gfortran
+ # Needed if we download some packages from a https upstream URL
+ ca-certificates
+diff --git a/build/pkgs/_prereq/distros/fedora.txt b/build/pkgs/_prereq/distros/fedora.txt
+index d5a5ae7..a82e29a 100644
+--- a/build/pkgs/_prereq/distros/fedora.txt
++++ b/build/pkgs/_prereq/distros/fedora.txt
+@@ -26,7 +26,6 @@ gcc
+ # configure: error: in `/sage':
+ # configure: error: C++ preprocessor "/lib/cpp" fails sanity check
+ gcc-c++
+-gcc-gfortran
+ # Needed according to embray at https://trac.sagemath.org/ticket/26964:
+ # The need for which comes [...] from MPIR's configure script
+ findutils
+diff --git a/build/pkgs/_prereq/distros/freebsd.txt b/build/pkgs/_prereq/distros/freebsd.txt
+index ec26136..cc708cc 100644
+--- a/build/pkgs/_prereq/distros/freebsd.txt
++++ b/build/pkgs/_prereq/distros/freebsd.txt
+@@ -17,4 +17,3 @@ automake
+ bash
+ dash
+ python # python metaport for bootstrapping the build
+-lang/gcc9 # gfortran
+diff --git a/build/pkgs/_prereq/distros/homebrew.txt b/build/pkgs/_prereq/distros/homebrew.txt
+index f537c17..863c22a 100644
+--- a/build/pkgs/_prereq/distros/homebrew.txt
++++ b/build/pkgs/_prereq/distros/homebrew.txt
+@@ -8,4 +8,5 @@
+ # for use in "sage -info SPKG".
+ #
+ # Everything on a line after a # character is ignored.
+-gcc
++
++# No packages needed
+diff --git a/build/pkgs/_prereq/distros/macports.txt b/build/pkgs/_prereq/distros/macports.txt
+deleted file mode 100644
+index c2878ad..00000000
+--- a/build/pkgs/_prereq/distros/macports.txt
++++ /dev/null
+@@ -1 +0,0 @@
+-gcc10 +gfortran
+diff --git a/build/pkgs/_prereq/distros/opensuse.txt b/build/pkgs/_prereq/distros/opensuse.txt
+index 959ab26..070f456 100644
+--- a/build/pkgs/_prereq/distros/opensuse.txt
++++ b/build/pkgs/_prereq/distros/opensuse.txt
+@@ -19,7 +19,6 @@ which
+ glibc-locale-base
+ gcc
+ gcc-c++
+-gcc-fortran
+ # Needed if we download some packages from a https upstream URL
+ ca-certificates
+ # gunzip needed for ppl spkg
+diff --git a/build/pkgs/_prereq/distros/slackware.txt b/build/pkgs/_prereq/distros/slackware.txt
+index 11ec3b9..a976efe 100644
+--- a/build/pkgs/_prereq/distros/slackware.txt
++++ b/build/pkgs/_prereq/distros/slackware.txt
+@@ -3,7 +3,6 @@ make
+ guile gc libffi  # dependencies of make
+ "gcc-[0-9]"      # So that slackpkg pattern matching does not pull in all gcc-* packages
+ gcc-g++
+-gcc-gfortran
+ libmpc glibc kernel-headers # dependencies of gcc
+ perl
+ m4
+diff --git a/build/pkgs/_prereq/distros/void.txt b/build/pkgs/_prereq/distros/void.txt
+index 2769f4d..a2e7644 100644
+--- a/build/pkgs/_prereq/distros/void.txt
++++ b/build/pkgs/_prereq/distros/void.txt
+@@ -7,5 +7,4 @@ python3
+ tar
+ bc
+ gcc
+-gcc-fortran
+ which
+-- 
+cgit v1.0-1-gd88e
+
+
+From 62792d4b191d2116774562147a5d089b88d5c1cd Mon Sep 17 00:00:00 2001
+From: Dima Pasechnik <dima@pasechnik.info>
+Date: Tue, 16 Nov 2021 18:42:30 +0000
+Subject: use pypi host for cycler url
+
+---
+ build/pkgs/cycler/checksums.ini | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/build/pkgs/cycler/checksums.ini b/build/pkgs/cycler/checksums.ini
+index 8883ddd..b9f7e51 100644
+--- a/build/pkgs/cycler/checksums.ini
++++ b/build/pkgs/cycler/checksums.ini
+@@ -1,5 +1,5 @@
+ tarball=cycler-VERSION.tar.gz
+-sha1=ea144185cf1d54d7415e3c66d705d9a232e57da5
+-md5=cf3b4846fded12fa4d2a7a291a5d6e13
+-cksum=3626319704
+-upstream_url=https://github.com/matplotlib/cycler/archive/refs/tags/vVERSION.tar.gz
++sha1=576c8605d33a8f70eccabf321ecc9e2fbdb9fb72
++md5=4d0c25f418956e91c47163179682e0ef
++cksum=2916957464
++upstream_url=https://files.pythonhosted.org/packages/source/c/cycler/cycler-VERSION.tar.gz
+-- 
+cgit v1.0-1-gd88e
+
+
+From 6d203eb9812b244096f597f6998655110468c6ee Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Fri, 17 Dec 2021 18:34:30 -0800
+Subject: build/pkgs/matplotlib: Update to 3.5.1
+
+---
+ build/pkgs/matplotlib/checksums.ini       | 6 +++---
+ build/pkgs/matplotlib/package-version.txt | 2 +-
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/build/pkgs/matplotlib/checksums.ini b/build/pkgs/matplotlib/checksums.ini
+index 2783080..b2b3d3c 100644
+--- a/build/pkgs/matplotlib/checksums.ini
++++ b/build/pkgs/matplotlib/checksums.ini
+@@ -1,5 +1,5 @@
+ tarball=matplotlib-VERSION.tar.gz
+-sha1=764fb3c673f45bedb472bc81c63b9c36f7973c46
+-md5=6858958370a26cccfa81abc7b6dd3622
+-cksum=2317464343
++sha1=a9bb3b92594d991908a0052384c6abed81227a6f
++md5=63adf3126167a54b1d5a506a71ecef46
++cksum=1898324331
+ upstream_url=https://pypi.io/packages/source/m/matplotlib/matplotlib-VERSION.tar.gz
+diff --git a/build/pkgs/matplotlib/package-version.txt b/build/pkgs/matplotlib/package-version.txt
+index 6cb9d3d..d5c0c99 100644
+--- a/build/pkgs/matplotlib/package-version.txt
++++ b/build/pkgs/matplotlib/package-version.txt
+@@ -1 +1 @@
+-3.4.3
++3.5.1
+-- 
+cgit v1.0-1-gd88e
+
+
+From 5a68988cfb3f32884e9d2d68f484745c34c70ee1 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Fri, 17 Dec 2021 18:46:25 -0800
+Subject: build/pkgs/matplotlib/make-setup-config.py: Write mplsetup.cfg, not
+ setup.cfg
+
+---
+ build/pkgs/matplotlib/make-setup-config.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/build/pkgs/matplotlib/make-setup-config.py b/build/pkgs/matplotlib/make-setup-config.py
+index 2a53eab..98450de 100644
+--- a/build/pkgs/matplotlib/make-setup-config.py
++++ b/build/pkgs/matplotlib/make-setup-config.py
+@@ -37,5 +37,5 @@ config.add_section('gui_support')
+ for backend in ('gtk', 'gtkagg', 'tkagg', 'wxagg', 'macosx', 'windowing'):
+     config.set('gui_support', backend,  graphical_backend)
+ 
+-with open('src/setup.cfg', 'w') as configfile:
++with open('src/mplsetup.cfg', 'w') as configfile:
+     config.write(configfile)
+-- 
+cgit v1.0-1-gd88e
+
+
+From 767092b9dc04a4744b9e10ab4dabc0684756e038 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Fri, 17 Dec 2021 18:46:42 -0800
+Subject: build/pkgs/matplotlib/dependencies: Update dependencies
+
+---
+ build/pkgs/matplotlib/dependencies | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/build/pkgs/matplotlib/dependencies b/build/pkgs/matplotlib/dependencies
+index e32a563..0b3e62b 100644
+--- a/build/pkgs/matplotlib/dependencies
++++ b/build/pkgs/matplotlib/dependencies
+@@ -1,4 +1,4 @@
+-$(PYTHON) numpy freetype pillow dateutil pyparsing tornado six cycler qhull | $(PYTHON_TOOLCHAIN) pytz kiwisolver certifi
++$(PYTHON) numpy freetype pillow dateutil pyparsing tornado six cycler qhull fonttools | $(PYTHON_TOOLCHAIN) pytz kiwisolver certifi setuptools_scm_git_archive
+ 
+ ----------
+ All lines of this file are ignored except the first.
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9b5a66335b9cf7b46c27c35b75ed12511660f858 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Fri, 17 Dec 2021 18:47:08 -0800
+Subject: build/pkgs/setuptools_scm_git_archive: New, matplotlib dependency
+
+---
+ build/pkgs/setuptools_scm_git_archive/SPKG.rst         | 18 ++++++++++++++++++
+ build/pkgs/setuptools_scm_git_archive/checksums.ini    |  5 +++++
+ build/pkgs/setuptools_scm_git_archive/dependencies     |  4 ++++
+ .../setuptools_scm_git_archive/install-requires.txt    |  1 +
+ .../setuptools_scm_git_archive/package-version.txt     |  1 +
+ build/pkgs/setuptools_scm_git_archive/spkg-install.in  |  2 ++
+ build/pkgs/setuptools_scm_git_archive/type             |  1 +
+ 7 files changed, 32 insertions(+)
+ create mode 100644 build/pkgs/setuptools_scm_git_archive/SPKG.rst
+ create mode 100644 build/pkgs/setuptools_scm_git_archive/checksums.ini
+ create mode 100644 build/pkgs/setuptools_scm_git_archive/dependencies
+ create mode 100644 build/pkgs/setuptools_scm_git_archive/install-requires.txt
+ create mode 100644 build/pkgs/setuptools_scm_git_archive/package-version.txt
+ create mode 100644 build/pkgs/setuptools_scm_git_archive/spkg-install.in
+ create mode 100644 build/pkgs/setuptools_scm_git_archive/type
+
+diff --git a/build/pkgs/setuptools_scm_git_archive/SPKG.rst b/build/pkgs/setuptools_scm_git_archive/SPKG.rst
+new file mode 100644
+index 00000000..540e0c2
+--- /dev/null
++++ b/build/pkgs/setuptools_scm_git_archive/SPKG.rst
+@@ -0,0 +1,18 @@
++setuptools_scm_git_archive: setuptools_scm plugin for git archives
++==================================================================
++
++Description
++-----------
++
++setuptools_scm plugin for git archives
++
++License
++-------
++
++MIT
++
++Upstream Contact
++----------------
++
++https://pypi.org/project/setuptools-scm-git-archive/
++
+diff --git a/build/pkgs/setuptools_scm_git_archive/checksums.ini b/build/pkgs/setuptools_scm_git_archive/checksums.ini
+new file mode 100644
+index 00000000..9a773ee
+--- /dev/null
++++ b/build/pkgs/setuptools_scm_git_archive/checksums.ini
+@@ -0,0 +1,5 @@
++tarball=setuptools_scm_git_archive-VERSION.tar.gz
++sha1=eda18924f3917e94cc54227660e3437d47f53bb9
++md5=1c9351fa5cebd12e76488737a7c78f2e
++cksum=188023730
++upstream_url=https://pypi.io/packages/source/s/setuptools_scm_git_archive/setuptools_scm_git_archive-VERSION.tar.gz
+diff --git a/build/pkgs/setuptools_scm_git_archive/dependencies b/build/pkgs/setuptools_scm_git_archive/dependencies
+new file mode 100644
+index 00000000..0738c2d
+--- /dev/null
++++ b/build/pkgs/setuptools_scm_git_archive/dependencies
+@@ -0,0 +1,4 @@
++$(PYTHON) | $(PYTHON_TOOLCHAIN)
++
++----------
++All lines of this file are ignored except the first.
+diff --git a/build/pkgs/setuptools_scm_git_archive/install-requires.txt b/build/pkgs/setuptools_scm_git_archive/install-requires.txt
+new file mode 100644
+index 00000000..538474f
+--- /dev/null
++++ b/build/pkgs/setuptools_scm_git_archive/install-requires.txt
+@@ -0,0 +1 @@
++setuptools-scm-git-archive
+diff --git a/build/pkgs/setuptools_scm_git_archive/package-version.txt b/build/pkgs/setuptools_scm_git_archive/package-version.txt
+new file mode 100644
+index 00000000..9459d4b
+--- /dev/null
++++ b/build/pkgs/setuptools_scm_git_archive/package-version.txt
+@@ -0,0 +1 @@
++1.1
+diff --git a/build/pkgs/setuptools_scm_git_archive/spkg-install.in b/build/pkgs/setuptools_scm_git_archive/spkg-install.in
+new file mode 100644
+index 00000000..37ac1a5
+--- /dev/null
++++ b/build/pkgs/setuptools_scm_git_archive/spkg-install.in
+@@ -0,0 +1,2 @@
++cd src
++sdh_pip_install .
+diff --git a/build/pkgs/setuptools_scm_git_archive/type b/build/pkgs/setuptools_scm_git_archive/type
+new file mode 100644
+index 00000000..a6a7b9c
+--- /dev/null
++++ b/build/pkgs/setuptools_scm_git_archive/type
+@@ -0,0 +1 @@
++standard
+-- 
+cgit v1.0-1-gd88e
+
+
+From d865a54526829b79d5d236a40f83ddc6ce7b2696 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sat, 18 Dec 2021 12:33:27 -0800
+Subject: build/pkgs/fonttools: New
+
+---
+ build/pkgs/fonttools/SPKG.rst             | 18 ++++++++++++++++++
+ build/pkgs/fonttools/checksums.ini        |  5 +++++
+ build/pkgs/fonttools/dependencies         |  4 ++++
+ build/pkgs/fonttools/install-requires.txt |  1 +
+ build/pkgs/fonttools/package-version.txt  |  1 +
+ build/pkgs/fonttools/spkg-install.in      |  3 +++
+ build/pkgs/fonttools/type                 |  1 +
+ 7 files changed, 33 insertions(+)
+ create mode 100644 build/pkgs/fonttools/SPKG.rst
+ create mode 100644 build/pkgs/fonttools/checksums.ini
+ create mode 100644 build/pkgs/fonttools/dependencies
+ create mode 100644 build/pkgs/fonttools/install-requires.txt
+ create mode 100644 build/pkgs/fonttools/package-version.txt
+ create mode 100644 build/pkgs/fonttools/spkg-install.in
+ create mode 100644 build/pkgs/fonttools/type
+
+diff --git a/build/pkgs/fonttools/SPKG.rst b/build/pkgs/fonttools/SPKG.rst
+new file mode 100644
+index 00000000..7882c8b
+--- /dev/null
++++ b/build/pkgs/fonttools/SPKG.rst
+@@ -0,0 +1,18 @@
++fonttools: Tools to manipulate font files
++=========================================
++
++Description
++-----------
++
++Tools to manipulate font files
++
++License
++-------
++
++MIT
++
++Upstream Contact
++----------------
++
++https://pypi.org/project/fonttools/
++
+diff --git a/build/pkgs/fonttools/checksums.ini b/build/pkgs/fonttools/checksums.ini
+new file mode 100644
+index 00000000..1a0ba14
+--- /dev/null
++++ b/build/pkgs/fonttools/checksums.ini
+@@ -0,0 +1,5 @@
++tarball=fonttools-VERSION.zip
++sha1=8d6f8120ad4b3d00dd92cfea3a2e0b4ae1d72bc7
++md5=c1605575dcc45ef35455ae1d606868b3
++cksum=3346598630
++upstream_url=https://pypi.io/packages/source/f/fonttools/fonttools-VERSION.zip
+diff --git a/build/pkgs/fonttools/dependencies b/build/pkgs/fonttools/dependencies
+new file mode 100644
+index 00000000..9c73666
+--- /dev/null
++++ b/build/pkgs/fonttools/dependencies
+@@ -0,0 +1,4 @@
++$(PYTHON) | $(PYTHON_TOOLCHAIN) cython
++
++----------
++All lines of this file are ignored except the first.
+diff --git a/build/pkgs/fonttools/install-requires.txt b/build/pkgs/fonttools/install-requires.txt
+new file mode 100644
+index 00000000..d32bfca
+--- /dev/null
++++ b/build/pkgs/fonttools/install-requires.txt
+@@ -0,0 +1 @@
++fonttools
+diff --git a/build/pkgs/fonttools/package-version.txt b/build/pkgs/fonttools/package-version.txt
+new file mode 100644
+index 00000000..1f30b28
+--- /dev/null
++++ b/build/pkgs/fonttools/package-version.txt
+@@ -0,0 +1 @@
++4.28.4
+diff --git a/build/pkgs/fonttools/spkg-install.in b/build/pkgs/fonttools/spkg-install.in
+new file mode 100644
+index 00000000..8855291
+--- /dev/null
++++ b/build/pkgs/fonttools/spkg-install.in
+@@ -0,0 +1,3 @@
++cd src
++export FONTTOOLS_WITH_CYTHON=1
++sdh_pip_install .
+diff --git a/build/pkgs/fonttools/type b/build/pkgs/fonttools/type
+new file mode 100644
+index 00000000..a6a7b9c
+--- /dev/null
++++ b/build/pkgs/fonttools/type
+@@ -0,0 +1 @@
++standard
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 7764899e557f..1d11705eecb7 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -22,6 +22,11 @@ distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
 checksum=124f3d23ce6442ecc84ed98e3c035e0d00c8261c3125712e4742c32e731d13de
 python_version=3
 
+build_options="system_python3"
+desc_option_system_python="Build using system python 3"
+build_options_default="system_python3"
+configure_args+=" $(vopt_with system_python3)"
+
 # path where sage will be installed
 _SAGE_ROOT=/usr/lib/sage-${version}
 
@@ -30,6 +35,74 @@ case ${version} in
 	*.beta*|*.rc*) distfiles=${distfiles/sage\/src/sage\/devel} ;;
 esac
 
+# extra upstream packages (trac-30766 / trac-32968 / trac-33020 / trac-33040)
+_upstream="
+ https://pypi.io/packages/source/i/ipython/ipython-7.29.0.tar.gz
+ https://pypi.io/packages/source/i/ipykernel/ipykernel-6.5.1.tar.gz
+ https://pypi.io/packages/source/i/ipywidgets/ipywidgets-7.6.5.tar.gz
+ https://pypi.io/packages/source/j/jedi/jedi-0.18.1.tar.gz
+ https://pypi.io/packages/source/p/prompt_toolkit/prompt_toolkit-3.0.22.tar.gz
+ https://pypi.io/packages/source/w/widgetsnbextension/widgetsnbextension-3.5.2.tar.gz
+ https://pypi.io/packages/source/t/terminado/terminado-0.12.1.tar.gz
+ https://pypi.io/packages/source/n/notebook/notebook-6.4.6.tar.gz
+ https://pypi.io/packages/source/n/nbclient/nbclient-0.5.9.tar.gz
+ https://pypi.io/packages/source/j/jupyter_client/jupyter_client-7.1.0.tar.gz
+ https://pypi.io/packages/source/j/jupyter_core/jupyter_core-4.9.1.tar.gz
+ https://pypi.io/packages/source/i/importlib_metadata/importlib_metadata-4.8.2.tar.gz
+
+ https://pypi.io/packages/source/s/sphinx/Sphinx-4.3.1.tar.gz
+
+ https://pypi.io/packages/source/i/ipykernel/ipykernel-6.6.0.tar.gz
+
+ https://files.pythonhosted.org/packages/source/c/cycler/cycler-0.11.0.tar.gz
+ https://files.pythonhosted.org/packages/source/k/kiwisolver/kiwisolver-1.3.2.tar.gz
+ https://pypi.io/packages/source/p/pytz/pytz-2021.3.tar.gz
+ https://files.pythonhosted.org/packages/source/c/cppy/cppy-1.1.0.tar.gz
+ https://pypi.io/packages/source/c/certifi/certifi-2021.10.8.tar.gz
+ https://files.pythonhosted.org/packages/source/p/python-dateutil/python-dateutil-2.8.2.tar.gz
+ https://pypi.io/packages/source/p/pillow/Pillow-8.4.0.tar.gz
+ https://files.pythonhosted.org/packages/source/p/pyparsing/pyparsing-3.0.6.tar.gz
+ https://pypi.io/packages/source/m/matplotlib/matplotlib-3.5.1.tar.gz
+ https://pypi.io/packages/source/s/setuptools_scm_git_archive/setuptools_scm_git_archive-1.1.tar.gz
+ https://pypi.io/packages/source/f/fonttools/fonttools-4.28.4.zip
+"
+
+checksum+="
+ 4f69d7423a5a1972f6347ff233e38bbf4df6a150ef20fbb00c635442ac3060aa
+ dd27172bccbbcfef952991e49372e4c6fd1c14eed0df05ebd5b4335cb27a81a2
+ 00974f7cb4d5f8d494c19810fedb9fa9b64bffd3cda7c2be23c133a1ad3c99c5
+ 74137626a64a99c8eb6ae5832d99b3bdd7d29a3850fe2aa80a4126b2a7d949ab
+ 449f333dd120bd01f5d296a8ce1452114ba3a71fae7288d2f0ae2c918764fa72
+ e0731a60ba540cd19bbbefe771a9076dcd2dde90713a8f87f27f53f2d1db7727
+ b20fd93cc57c1678c799799d117874367cc07a3d2d55be95205b1a88fa08393f
+ 7bcdf79bd1cda534735bd9830d2cbedab4ee34d8fe1df6e7b946b3aab0902ba3
+ 99e46ddafacd0b861293bf246fed8540a184adfa3aa7d641f89031ec070701e0
+ a5f995a73cffb314ed262713ae6dfce53c6b8216cea9f332071b8ff44a6e1654
+ dce8a7499da5a53ae3afd5a9f4b02e5df1d57250cf48f3ad79da23b4778cd6fa
+ 75bdec14c397f528724c1bfd9709d660b33a4d2e77387a3358f20b848bb5e5fb
+
+ 32a5b3e9a1b176cc25ed048557d4d3d01af635e6b76c5bc7a43b0a34447fbd45
+
+ 3a227788216b43982d9ac28195949467627b0d16e6b8af9741d95dcaa8c41a89
+
+ 9c87405839a19696e837b3b818fed3f5f69f16f1eec1a1ad77e043dcea9c772f
+ fc4453705b81d03568d5b808ad8f09c77c47534f6ac2e72e733f9ca4714aa75c
+ acad2d8b20a1af07d4e4c9d2e9285c5ed9104354062f275f3fcd88dcef4f1326
+ 4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642
+ 78884e7c1d4b00ce3cea67b44566851c4343c120abd683433ce934a68ea58872
+ 0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86
+ b8e2f83c56e141920c39464b852de3719dfbfb6e3c99a2d8da0edf4fb33176ed
+ d9bdec0013ef1eb5a84ab39a3b3868911598afa494f5faa038647101504e2b81
+ b2e9810e09c3a47b73ce9cab5a72243a1258f61e7900969097a817232246ce1c
+ 6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
+ 581a682a7102a41421e7e484303572c565c1b8e52b1cc9fecd3c159dbe9a02f4
+"
+
+for u in ${_upstream}; do
+	distfiles+=" $u"
+	skip_extraction+=" ${u##*[/>]}"
+done
+
 # for now, skip check in ci, since we still have a few tests failing
 #make_check=ci-skip
 
@@ -51,6 +124,10 @@ post_extract() {
 	rm -rf $_SAGE_ROOT
 	mv -T $wrksrc $_SAGE_ROOT
 	ln -srfT $_SAGE_ROOT $wrksrc
+
+	for u in ${_upstream}; do
+		cp "$XBPS_SRCDISTDIR/${pkgname}-${version}/${u##*[/>]}" $wrksrc/upstream
+	done
 }
 
 do_clean() {
@@ -92,6 +169,7 @@ do_check() {
 	OPT="--optional sage,optional,build"
 	# since make check will build the docs, run test like this instead
 	./sage -tp ${XBPS_MAKEJOBS} ${OPT} ${TEST}
+	#./sage -t ${OPT} ${TEST}
 }
 
 ### copied from sage-deps, to be kept in sync

From 466902faff75a014ed3b5fd6cabfb37564c45e4e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 21 Dec 2021 17:12:18 -0300
Subject: [PATCH 16/19] sagemath: more changes

 - setup trigger to compile python code on install
 - more cleanup
 - add some empty dirs needed to pass doctests after installation, since
   the tree is readonly; maybe a different fix is patch those doctests
   with the tag "# optional - dochtml" so they only run when we install
   the documentation.
 - temporarily keep pkgs/*/build which is needed by a doctest, but this
   is a lot of useless stuff on a readonly tree so I'll fix it in a
   different way later (patch the doctest so it works both when this
   directory is present and when it's not)
 - a patch to pass doctest on readonly tree (https://trac.sagemath.org/33064)
 - more patches to remove deprecation warnings
 - patch to avoid a warning when byte-compiling sagetexparse.py
 - patch to remove a slow doctest
 - rename patches to match trac tickets
---
 ...rning-when-byte-compiling-sagetexpar.patch |  35 ++++
 ...840b4f066a206cca26c54a8206740a8f6c66.patch | 151 ++++++++++++++++++
 ...c4322416b2ef96590a5b42d3916342f48059.patch |  28 ++++
 ...ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch} |   6 +-
 ...e8168a9ffb4fbf07dd03c0846b4933a6dbe.patch} |   8 +-
 ...26e3db5ea06b962fac386fa3c7223f9a14fb.patch |  51 ++++++
 ...cf1eadfd8ab540a31c5c5ef09d56df09b90e.patch |  32 ++++
 srcpkgs/sagemath/template                     |  20 ++-
 8 files changed, 322 insertions(+), 9 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch
 create mode 100644 srcpkgs/sagemath/patches/trac-32964-speed_up_doctest_orthogonal_polys-2aef840b4f066a206cca26c54a8206740a8f6c66.patch
 create mode 100644 srcpkgs/sagemath/patches/trac-33041-suppress_pythran_deprecation_warnings-ee51c4322416b2ef96590a5b42d3916342f48059.patch
 rename srcpkgs/sagemath/patches/{0001-build-pkgs-gap-spkg-install-make-symlinks-relative.patch => trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch} (89%)
 rename srcpkgs/sagemath/patches/{0001-Add-a-patch-that-fixes-ctypes.util.find_library-c.patch => trac-33047-musl_fix_find_library-dc1a0e8168a9ffb4fbf07dd03c0846b4933a6dbe.patch} (92%)
 create mode 100644 srcpkgs/sagemath/patches/trac-33063-notebook_fix_deprecation_warning-966926e3db5ea06b962fac386fa3c7223f9a14fb.patch
 create mode 100644 srcpkgs/sagemath/patches/trac-33064-sage_docbuild_ignore_cache_save_permission_error-f767cf1eadfd8ab540a31c5c5ef09d56df09b90e.patch

diff --git a/srcpkgs/sagemath/patches/0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch b/srcpkgs/sagemath/patches/0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch
new file mode 100644
index 000000000000..bab6d8441d42
--- /dev/null
+++ b/srcpkgs/sagemath/patches/0001-sagetex-Fix-a-warning-when-byte-compiling-sagetexpar.patch
@@ -0,0 +1,35 @@
+From 57e3eba28c9b4ee6bd3407d0715b8bd00aaf04a7 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Wed, 22 Dec 2021 19:02:08 -0300
+Subject: [PATCH] sagetex: Fix a warning when byte-compiling sagetexparse.py
+
+---
+ .../sagetex/patches/sagetex-fix-warning.patch    | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+ create mode 100644 build/pkgs/sagetex/patches/sagetex-fix-warning.patch
+
+diff --git a/build/pkgs/sagetex/patches/sagetex-fix-warning.patch b/build/pkgs/sagetex/patches/sagetex-fix-warning.patch
+new file mode 100644
+index 0000000000..d82ab675dd
+--- /dev/null
++++ b/build/pkgs/sagetex/patches/sagetex-fix-warning.patch
+@@ -0,0 +1,16 @@
++Fix a warning when byte-compiling sagetexparse.py
++
++.../venv/share/texmf/tex/latex/sagetex/sagetexparse.py:135: SyntaxWarning: "is not" with a literal. Did you mean "!="?
++  if t.format is not '':
++
++--- a/sagetexparse.py	2020-08-12 05:35:31.000000000 -0300
+++++ b/sagetexparse.py	2021-12-22 18:57:46.619024835 -0300
++@@ -132,7 +132,7 @@
++ 
++   def plotout(self, s, l, t):
++     self.result += '# \\sageplot{} from line %s:\n' % lineno(l, s)
++-    if t.format is not '':
+++    if t.format != '':
++       self.result += '# format: %s' % t.format[0][1:-1] + '\n'
++     self.result += t.code[1:-1] + '\n\n'
++ 
+-- 
+2.34.1
+
diff --git a/srcpkgs/sagemath/patches/trac-32964-speed_up_doctest_orthogonal_polys-2aef840b4f066a206cca26c54a8206740a8f6c66.patch b/srcpkgs/sagemath/patches/trac-32964-speed_up_doctest_orthogonal_polys-2aef840b4f066a206cca26c54a8206740a8f6c66.patch
new file mode 100644
index 000000000000..97bba8fba0f5
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-32964-speed_up_doctest_orthogonal_polys-2aef840b4f066a206cca26c54a8206740a8f6c66.patch
@@ -0,0 +1,151 @@
+From e713a4f9601a066a42174db4a55cb62aee603840 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 3 Dec 2021 21:20:34 -0500
+Subject: Trac #32964: speed up a very slow doctest in
+ functions.orthogonal_polys.
+
+I've got 99 problems, and they're slow. One doctest in this module is
+repeating a random test 100 times, taking over four minutes on my
+machine. More tests are better, but in this case, coverage will
+eventually accrue from the number of testers even if we only repeat
+the test once within the file.
+
+Since this particular test is an EXAMPLE, I've also made it a bit more
+user-friendly while eliminating the additional runs.
+
+message for your changes. Lines starting # with '#' will be ignored,
+and an empty message aborts the commit.  # # On branch
+u/mjo/ticket/32964 # Changes to be committed: # modified:
+src/sage/functions/orthogonal_polys.py #
+---
+ src/sage/functions/orthogonal_polys.py | 11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/src/sage/functions/orthogonal_polys.py b/src/sage/functions/orthogonal_polys.py
+index de8a18b..522933e 100644
+--- a/src/sage/functions/orthogonal_polys.py
++++ b/src/sage/functions/orthogonal_polys.py
+@@ -2081,10 +2081,13 @@ class Func_ultraspherical(GinacFunction):
+         sage: gegenbauer(3,2,t)
+         32*t^3 - 12*t
+         sage: _ = var('x')
+-        sage: for N in range(100):
+-        ....:     n = ZZ.random_element(5, 5001)
+-        ....:     a = QQ.random_element().abs() + 5
+-        ....:     assert ((n+1)*ultraspherical(n+1,a,x) - 2*x*(n+a)*ultraspherical(n,a,x) + (n+2*a-1)*ultraspherical(n-1,a,x)).expand().is_zero()
++        sage: n = ZZ.random_element(5, 5001)
++        sage: a = QQ.random_element().abs() + 5
++        sage: s = (  (n+1)*ultraspherical(n+1,a,x)
++        ....:      - 2*x*(n+a)*ultraspherical(n,a,x)
++        ....:      + (n+2*a-1)*ultraspherical(n-1,a,x) )
++        sage: s.expand().is_zero()
++        True
+         sage: ultraspherical(5,9/10,3.1416)
+         6949.55439044240
+         sage: ultraspherical(5,9/10,RealField(100)(pi))
+-- 
+cgit v1.0-1-gd88e
+
+
+From a2343424267d7357c1ab6bec706e3447d6280687 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 3 Dec 2021 21:30:57 -0500
+Subject: Trac #32964: replace some uses of var() with SR.var().
+
+This is unrelated to the main purpose of ticket 32964, but while I was
+editing this file, I noticed that several examples use var() to inject
+symbolic expressions into the current scope. This commit changes them
+to use the preferred form `x = SR.var('x')` whose side-effects are
+much easier to predict.
+---
+ src/sage/functions/orthogonal_polys.py | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/src/sage/functions/orthogonal_polys.py b/src/sage/functions/orthogonal_polys.py
+index 522933e..cd845a5 100644
+--- a/src/sage/functions/orthogonal_polys.py
++++ b/src/sage/functions/orthogonal_polys.py
+@@ -1911,7 +1911,7 @@ class Func_hermite(GinacFunction):
+         ...
+         RuntimeError: hermite_eval: The index n must be a nonnegative integer
+ 
+-        sage: _ = var('m x')
++        sage: m,x = SR.var('m,x')
+         sage: hermite(m, x).diff(m)
+         Traceback (most recent call last):
+         ...
+@@ -1962,7 +1962,7 @@ class Func_jacobi_P(OrthogonalFunction):
+ 
+         EXAMPLES::
+ 
+-            sage: _ = var('n a b x')
++            sage: n,a,b,x = SR.var('n,a,b,x')
+             sage: loads(dumps(jacobi_P))
+             jacobi_P
+             sage: jacobi_P(n, a, b, x, hold=True)._sympy_()
+@@ -1976,7 +1976,7 @@ class Func_jacobi_P(OrthogonalFunction):
+         """
+         EXAMPLES::
+ 
+-            sage: _ = var('n a b x')
++            sage: n,a,b,x = SR.var('n,a,b,x')
+             sage: jacobi_P(1,n,n,n)
+             (n + 1)*n
+             sage: jacobi_P(2,n,n,n)
+@@ -2080,7 +2080,7 @@ class Func_ultraspherical(GinacFunction):
+         sage: t = PolynomialRing(RationalField(),"t").gen()
+         sage: gegenbauer(3,2,t)
+         32*t^3 - 12*t
+-        sage: _ = var('x')
++        sage: x = SR.var('x')
+         sage: n = ZZ.random_element(5, 5001)
+         sage: a = QQ.random_element().abs() + 5
+         sage: s = (  (n+1)*ultraspherical(n+1,a,x)
+@@ -2093,7 +2093,7 @@ class Func_ultraspherical(GinacFunction):
+         sage: ultraspherical(5,9/10,RealField(100)(pi))
+         6949.4695419382702451843080687
+ 
+-        sage: _ = var('a n')
++        sage: a,n = SR.var('a,n')
+         sage: gegenbauer(2,a,x)
+         2*(a + 1)*a*x^2 - a
+         sage: gegenbauer(3,a,x)
+-- 
+cgit v1.0-1-gd88e
+
+
+From 9b2f042147b4d25c5d7e1776bfb4b5c76db9d97b Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 3 Dec 2021 21:39:43 -0500
+Subject: Trac #32964: fix failing doctest in functions.orthogonal_polys.
+
+One of the examples in this module is expecting a doctest warning, but
+that warning is only emitted the first time it happens. When testing
+with
+
+  sage -t --file-iterations=2
+
+the warning does not appear in the second pass, and the test (that is
+expecting it) fails. This commit adds some more "..." to support both
+possible outcomes.
+---
+ src/sage/functions/orthogonal_polys.py | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/src/sage/functions/orthogonal_polys.py b/src/sage/functions/orthogonal_polys.py
+index cd845a5..beb4f2d 100644
+--- a/src/sage/functions/orthogonal_polys.py
++++ b/src/sage/functions/orthogonal_polys.py
+@@ -495,8 +495,7 @@ class ChebyshevFunction(OrthogonalFunction):
+             sage: chebyshev_T(5,Qp(3)(2))
+             2 + 3^2 + 3^3 + 3^4 + 3^5 + O(3^20)
+             sage: chebyshev_T(100001/2, 2)
+-            doctest:...: RuntimeWarning: mpmath failed, keeping expression unevaluated
+-            chebyshev_T(100001/2, 2)
++            ...chebyshev_T(100001/2, 2)
+             sage: chebyshev_U._eval_(1.5, Mod(8,9)) is None
+             True
+         """
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/trac-33041-suppress_pythran_deprecation_warnings-ee51c4322416b2ef96590a5b42d3916342f48059.patch b/srcpkgs/sagemath/patches/trac-33041-suppress_pythran_deprecation_warnings-ee51c4322416b2ef96590a5b42d3916342f48059.patch
new file mode 100644
index 000000000000..5263dc2d9d08
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-33041-suppress_pythran_deprecation_warnings-ee51c4322416b2ef96590a5b42d3916342f48059.patch
@@ -0,0 +1,28 @@
+From ee51c4322416b2ef96590a5b42d3916342f48059 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sat, 18 Dec 2021 14:23:57 -0800
+Subject: src/sage/all.py: Suppress numpy deprecation warnings triggered by
+ pythran
+
+---
+ src/sage/all.py | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/sage/all.py b/src/sage/all.py
+index 27cbfe7..3b50ef0 100644
+--- a/src/sage/all.py
++++ b/src/sage/all.py
+@@ -91,6 +91,10 @@ warnings.filterwarnings('ignore', category=DeprecationWarning,
+ warnings.filterwarnings('ignore', category=DeprecationWarning,
+     module='(.*[.]_vendor[.])?packaging')
+ 
++# Ignore numpy warnings triggered by pythran
++warnings.filterwarnings('ignore', category=DeprecationWarning,
++                        module='pythran')
++
+ ################ end setup warnings ###############################
+ 
+ 
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/0001-build-pkgs-gap-spkg-install-make-symlinks-relative.patch b/srcpkgs/sagemath/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch
similarity index 89%
rename from srcpkgs/sagemath/patches/0001-build-pkgs-gap-spkg-install-make-symlinks-relative.patch
rename to srcpkgs/sagemath/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch
index c9feb870f2be..485fb0176f45 100644
--- a/srcpkgs/sagemath/patches/0001-build-pkgs-gap-spkg-install-make-symlinks-relative.patch
+++ b/srcpkgs/sagemath/patches/trac-33046-gap_make_symlinks_relative-521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34.patch
@@ -1,14 +1,14 @@
 From 521a9ec8d447be5bbd3a4260e7a5e0e4653e0c34 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
 Date: Sun, 28 Nov 2021 18:57:34 -0300
-Subject: [PATCH] build/pkgs/gap/spkg-install: make symlinks relative
+Subject: build/pkgs/gap/spkg-install: make symlinks relative
 
 ---
  build/pkgs/gap/spkg-install.in | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/build/pkgs/gap/spkg-install.in b/build/pkgs/gap/spkg-install.in
-index 32d1fb982c..2ceadf99db 100644
+index 32d1fb9..2ceadf9 100644
 --- a/build/pkgs/gap/spkg-install.in
 +++ b/build/pkgs/gap/spkg-install.in
 @@ -80,8 +80,8 @@ chmod +x "$SAGE_DESTDIR$SAGE_BIN/gap"
@@ -23,5 +23,5 @@ index 32d1fb982c..2ceadf99db 100644
  # Fix the $GAP_ROOT/bin/<arch>/src symlink to be relative (otherwise it links
  # to the actual path of the sources GAP was compiled from)
 -- 
-2.34.1
+cgit v1.0-1-gd88e
 
diff --git a/srcpkgs/sagemath/patches/0001-Add-a-patch-that-fixes-ctypes.util.find_library-c.patch b/srcpkgs/sagemath/patches/trac-33047-musl_fix_find_library-dc1a0e8168a9ffb4fbf07dd03c0846b4933a6dbe.patch
similarity index 92%
rename from srcpkgs/sagemath/patches/0001-Add-a-patch-that-fixes-ctypes.util.find_library-c.patch
rename to srcpkgs/sagemath/patches/trac-33047-musl_fix_find_library-dc1a0e8168a9ffb4fbf07dd03c0846b4933a6dbe.patch
index 4f89c2bd8fbc..3d4f4e14bb7b 100644
--- a/srcpkgs/sagemath/patches/0001-Add-a-patch-that-fixes-ctypes.util.find_library-c.patch
+++ b/srcpkgs/sagemath/patches/trac-33047-musl_fix_find_library-dc1a0e8168a9ffb4fbf07dd03c0846b4933a6dbe.patch
@@ -1,17 +1,17 @@
 From dc1a0e8168a9ffb4fbf07dd03c0846b4933a6dbe Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
 Date: Mon, 22 Nov 2021 23:57:37 -0300
-Subject: [PATCH] Add a patch that fixes ctypes.util.find_library('c')
+Subject: Add a patch that fixes ctypes.util.find_library('c')
 
 The issue causes a failure doctesting src/sage/misc/gperftools.py
 ---
- .../python3/patches/musl-find_library.patch   | 44 +++++++++++++++++++
+ build/pkgs/python3/patches/musl-find_library.patch | 44 ++++++++++++++++++++++
  1 file changed, 44 insertions(+)
  create mode 100644 build/pkgs/python3/patches/musl-find_library.patch
 
 diff --git a/build/pkgs/python3/patches/musl-find_library.patch b/build/pkgs/python3/patches/musl-find_library.patch
 new file mode 100644
-index 0000000000..82f436b407
+index 00000000..82f436b
 --- /dev/null
 +++ b/build/pkgs/python3/patches/musl-find_library.patch
 @@ -0,0 +1,44 @@
@@ -60,5 +60,5 @@ index 0000000000..82f436b407
 + 
 +         def _findSoname_ldconfig(name):
 -- 
-2.34.0
+cgit v1.0-1-gd88e
 
diff --git a/srcpkgs/sagemath/patches/trac-33063-notebook_fix_deprecation_warning-966926e3db5ea06b962fac386fa3c7223f9a14fb.patch b/srcpkgs/sagemath/patches/trac-33063-notebook_fix_deprecation_warning-966926e3db5ea06b962fac386fa3c7223f9a14fb.patch
new file mode 100644
index 000000000000..921a1669fd2a
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-33063-notebook_fix_deprecation_warning-966926e3db5ea06b962fac386fa3c7223f9a14fb.patch
@@ -0,0 +1,51 @@
+From 966926e3db5ea06b962fac386fa3c7223f9a14fb Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Tue, 21 Dec 2021 14:57:20 -0300
+Subject: notebook: fix deprecation warning
+
+While doctesting `src/sage/repl/ipython_kernel/install.py`:
+
+> DeprecationWarning: invalid escape sequence '\s'
+
+The solution is to make the regex a raw string.
+---
+ .../f99beefdf45dd2891bb7ebdd93f7a67e44623aee.patch | 27 ++++++++++++++++++++++
+ 1 file changed, 27 insertions(+)
+ create mode 100644 build/pkgs/notebook/patches/f99beefdf45dd2891bb7ebdd93f7a67e44623aee.patch
+
+diff --git a/build/pkgs/notebook/patches/f99beefdf45dd2891bb7ebdd93f7a67e44623aee.patch b/build/pkgs/notebook/patches/f99beefdf45dd2891bb7ebdd93f7a67e44623aee.patch
+new file mode 100644
+index 00000000..29875b0
+--- /dev/null
++++ b/build/pkgs/notebook/patches/f99beefdf45dd2891bb7ebdd93f7a67e44623aee.patch
+@@ -0,0 +1,27 @@
++From f99beefdf45dd2891bb7ebdd93f7a67e44623aee Mon Sep 17 00:00:00 2001
++From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
++Date: Tue, 21 Dec 2021 14:54:24 -0300
++Subject: [PATCH] Fix deprecation warning
++
++In sagemath, while doctesting `src/sage/repl/ipython_kernel/install.py`:
++
++> DeprecationWarning: invalid escape sequence '\s'
++
++The solution is to make the regex a raw string.
++---
++ notebook/auth/login.py | 2 +-
++ 1 file changed, 1 insertion(+), 1 deletion(-)
++
++diff --git a/notebook/auth/login.py b/notebook/auth/login.py
++index 1ac434dc5e..16c4e7a356 100644
++--- a/notebook/auth/login.py
+++++ b/notebook/auth/login.py
++@@ -112,7 +112,7 @@ def set_login_cookie(cls, handler, user_id=None):
++         handler.set_secure_cookie(handler.cookie_name, user_id, **cookie_options)
++         return user_id
++ 
++-    auth_header_pat = re.compile('token\s+(.+)', re.IGNORECASE)
+++    auth_header_pat = re.compile(r'token\s+(.+)', re.IGNORECASE)
++ 
++     @classmethod
++     def get_token(cls, handler):
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/trac-33064-sage_docbuild_ignore_cache_save_permission_error-f767cf1eadfd8ab540a31c5c5ef09d56df09b90e.patch b/srcpkgs/sagemath/patches/trac-33064-sage_docbuild_ignore_cache_save_permission_error-f767cf1eadfd8ab540a31c5c5ef09d56df09b90e.patch
new file mode 100644
index 000000000000..20fa12e570eb
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-33064-sage_docbuild_ignore_cache_save_permission_error-f767cf1eadfd8ab540a31c5c5ef09d56df09b90e.patch
@@ -0,0 +1,32 @@
+From f767cf1eadfd8ab540a31c5c5ef09d56df09b90e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Tue, 21 Dec 2021 13:08:44 -0300
+Subject: sage_docbuild: do not fail when cache cannot be saved
+
+---
+ src/sage_docbuild/__init__.py | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/src/sage_docbuild/__init__.py b/src/sage_docbuild/__init__.py
+index 8a5c1a1..e188c9b 100644
+--- a/src/sage_docbuild/__init__.py
++++ b/src/sage_docbuild/__init__.py
+@@ -856,9 +856,12 @@ class ReferenceSubBuilder(DocBuilder):
+         Pickle the current reference cache for later retrieval.
+         """
+         cache = self.get_cache()
+-        with open(self.cache_filename(), 'wb') as file:
+-            pickle.dump(cache, file)
+-        logger.debug("Saved the reference cache: %s", self.cache_filename())
++        try:
++            with open(self.cache_filename(), 'wb') as file:
++                pickle.dump(cache, file)
++            logger.debug("Saved the reference cache: %s", self.cache_filename())
++        except PermissionError:
++            logger.debug("Permission denied for the reference cache: %s", self.cache_filename())
+ 
+     def get_sphinx_environment(self):
+         """
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 1d11705eecb7..09ce541a6a23 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -119,6 +119,9 @@ noshlibprovides=yes
 # don't rewrite python shebang as sage uses its own python (for now)
 _no_python_shebang=yes
 
+# compile python code in sage venv
+pycompile_dirs="$_SAGE_ROOT/venv"
+
 post_extract() {
 	# sage wants to be built in place so let $wrksrc be a symlink
 	rm -rf $_SAGE_ROOT
@@ -150,9 +153,22 @@ pre_configure() {
 
 do_install() {
 	vcopy $_SAGE_ROOT usr/lib/
-	# cleanup: upstream sources and build artifacts
+	# cleanup: upstream packages and build artifacts
 	rm -rf ${DESTDIR}/$_SAGE_ROOT/upstream
-	rm -rf ${DESTDIR}/$_SAGE_ROOT/pkgs/*/build
+	#rm -rf ${DESTDIR}/$_SAGE_ROOT/pkgs/*/build
+	# more cleanup
+	for d in .ci .circleci .git .github autom4te.cache config docker m4
+	do
+		rm -rf ${DESTDIR}/$_SAGE_ROOT/$d
+	done
+	# keep required empty dirs
+	for d in local/share/doc/sage/html/en/{docname,tutorial,reference} \
+	         local/share/doc/sage/doctrees/en/{docname,tutorial}
+	do
+		mkdir -p ${DESTDIR}/$_SAGE_ROOT/$d
+		touch ${DESTDIR}/$_SAGE_ROOT/$d/.empty
+	done
+
 	# symlink main binary
 	vmkdir usr/bin
 	# for now use sage-${version}_${revision} so it doesn't override

From 0c6b3722d2b2bdfc50d40019cd2013cc97e300ff Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sun, 26 Dec 2021 18:38:28 -0300
Subject: [PATCH 17/19] sagemath: more changes

 - add debug build option
 - fix pycompile_dirs
 - set MAKE with -j option before configure
 - improve handling of comments in ${XBPS_DISTDIR}/sagemath-check
---
 srcpkgs/sagemath/template | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index 09ce541a6a23..c2ba123ca0ac 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -22,7 +22,8 @@ distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
 checksum=124f3d23ce6442ecc84ed98e3c035e0d00c8261c3125712e4742c32e731d13de
 python_version=3
 
-build_options="system_python3"
+build_options="debug system_python3"
+desc_option_debug="Build with debug symbols"
 desc_option_system_python="Build using system python 3"
 build_options_default="system_python3"
 configure_args+=" $(vopt_with system_python3)"
@@ -120,7 +121,7 @@ noshlibprovides=yes
 _no_python_shebang=yes
 
 # compile python code in sage venv
-pycompile_dirs="$_SAGE_ROOT/venv"
+pycompile_dirs="$_SAGE_ROOT/venv/"
 
 post_extract() {
 	# sage wants to be built in place so let $wrksrc be a symlink
@@ -139,6 +140,12 @@ do_clean() {
 
 pre_configure() {
 	./bootstrap
+
+	if [ "$build_option_debug" ]; then
+		export SAGE_DEBUG=yes
+	fi
+
+	export MAKE="make -j ${XBPS_MAKEJOBS}"
 }
 
 # DISABLED pytest since it brings more harm than good
@@ -179,7 +186,7 @@ do_install() {
 do_check() {
 	TEST=--all
 	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
-		TEST="$(grep -v "^#" ${XBPS_DISTDIR}/sagemath-check)"
+		TEST="$(sed -e 's/#.*//' ${XBPS_DISTDIR}/sagemath-check)"
 	fi
 	# the default is "sage,dochtml,optional,build", we skip dochtml
 	OPT="--optional sage,optional,build"

From ae44956e919ea6d06ec8cd1da8b2290254ba85f6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sun, 26 Dec 2021 19:29:39 -0300
Subject: [PATCH 18/19] sagemath: update to 9.5.beta9.

---
 ...3996062c71a9326aafddaf465f6a56b40fe0.patch | 886 ------------------
 ...1d4ced4264f65ab704f725f6f5879b012796.patch | 263 ++++++
 ...08fd9d56d022ed28592f93f07ec8dce530ef.patch |  49 -
 ...b99e0270f80cf03b80418372f45274f46051.patch | 163 ----
 ...840b4f066a206cca26c54a8206740a8f6c66.patch | 151 ---
 ...77cfadd7b3872ad6f7001fe84fb7568c947c.patch |  84 --
 ...c4322416b2ef96590a5b42d3916342f48059.patch |  28 -
 ...508cb136b860d6ef36410811f07a14658492.patch |  51 +
 ...c98f32c0b9e65a0674d13c55b00fbf7b8a1f.patch |  68 ++
 ...4ea702799d8ddee23d306ea6622f2ac412ce.patch | 177 ++++
 srcpkgs/sagemath/template                     |  43 +-
 11 files changed, 562 insertions(+), 1401 deletions(-)
 delete mode 100644 srcpkgs/sagemath/patches/trac-30766-system_python_3.10-b5c73996062c71a9326aafddaf465f6a56b40fe0.patch
 create mode 100644 srcpkgs/sagemath/patches/trac-30766-system_python_3.10-df9f1d4ced4264f65ab704f725f6f5879b012796.patch
 delete mode 100644 srcpkgs/sagemath/patches/trac-32880-17e308fd9d56d022ed28592f93f07ec8dce530ef.patch
 delete mode 100644 srcpkgs/sagemath/patches/trac-32905-2ee7b99e0270f80cf03b80418372f45274f46051.patch
 delete mode 100644 srcpkgs/sagemath/patches/trac-32964-speed_up_doctest_orthogonal_polys-2aef840b4f066a206cca26c54a8206740a8f6c66.patch
 delete mode 100644 srcpkgs/sagemath/patches/trac-33020-update_ipykernel_to_6.6.0-715277cfadd7b3872ad6f7001fe84fb7568c947c.patch
 delete mode 100644 srcpkgs/sagemath/patches/trac-33041-suppress_pythran_deprecation_warnings-ee51c4322416b2ef96590a5b42d3916342f48059.patch
 create mode 100644 srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-179a508cb136b860d6ef36410811f07a14658492.patch
 create mode 100644 srcpkgs/sagemath/patches/trac-33081-fix_segfault_on_musl_1.2-36dc98f32c0b9e65a0674d13c55b00fbf7b8a1f.patch
 create mode 100644 srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch

diff --git a/srcpkgs/sagemath/patches/trac-30766-system_python_3.10-b5c73996062c71a9326aafddaf465f6a56b40fe0.patch b/srcpkgs/sagemath/patches/trac-30766-system_python_3.10-b5c73996062c71a9326aafddaf465f6a56b40fe0.patch
deleted file mode 100644
index eb9b0c3f6672..000000000000
--- a/srcpkgs/sagemath/patches/trac-30766-system_python_3.10-b5c73996062c71a9326aafddaf465f6a56b40fe0.patch
+++ /dev/null
@@ -1,886 +0,0 @@
-From fe947f3c9a6109b92dd4c19dda795ceb01c6f9a7 Mon Sep 17 00:00:00 2001
-From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
-Date: Wed, 24 Nov 2021 18:23:16 -0800
-Subject: build/pkgs/ipython: Update to 7.29.0
-
----
- build/pkgs/ipython/checksums.ini       | 6 +++---
- build/pkgs/ipython/package-version.txt | 2 +-
- 2 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/build/pkgs/ipython/checksums.ini b/build/pkgs/ipython/checksums.ini
-index aa743ea..03da012 100644
---- a/build/pkgs/ipython/checksums.ini
-+++ b/build/pkgs/ipython/checksums.ini
-@@ -1,5 +1,5 @@
- tarball=ipython-VERSION.tar.gz
--sha1=a64001602601a4a7917a32b496543153f82dd65a
--md5=e28a91669dc8b86569a99abed2c67f08
--cksum=4064786540
-+sha1=05165e7fdcebde908aa6b65892ef230795a01e6b
-+md5=159340b8ba158386f938a8b882749fed
-+cksum=1960065579
- upstream_url=https://pypi.io/packages/source/i/ipython/ipython-VERSION.tar.gz
-diff --git a/build/pkgs/ipython/package-version.txt b/build/pkgs/ipython/package-version.txt
-index f6b1800..d88eca0 100644
---- a/build/pkgs/ipython/package-version.txt
-+++ b/build/pkgs/ipython/package-version.txt
-@@ -1 +1 @@
--7.27.0
-+7.29.0
--- 
-cgit v1.0-1-gd88e
-
-
-From 7939a79de125c7f20e981b31c0124e1d80ec9e42 Mon Sep 17 00:00:00 2001
-From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
-Date: Wed, 24 Nov 2021 18:28:14 -0800
-Subject: build/pkgs/ipykernel: Update to 6.5.1
-
----
- build/pkgs/ipykernel/checksums.ini       | 6 +++---
- build/pkgs/ipykernel/package-version.txt | 2 +-
- 2 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/build/pkgs/ipykernel/checksums.ini b/build/pkgs/ipykernel/checksums.ini
-index 51eb667..ca1302e 100644
---- a/build/pkgs/ipykernel/checksums.ini
-+++ b/build/pkgs/ipykernel/checksums.ini
-@@ -1,5 +1,5 @@
- tarball=ipykernel-VERSION.tar.gz
--sha1=19b16c61057bb7f5ad97f7e91bb54cdfec260257
--md5=329c172babb38dff1be130ddf3a609af
--cksum=2936157099
-+sha1=2c2aa0e929bfd0e694da6b45d2de846a0a5d2812
-+md5=78797cb2389d8f131c75280f808aac15
-+cksum=1454395629
- upstream_url=https://pypi.io/packages/source/i/ipykernel/ipykernel-VERSION.tar.gz
-diff --git a/build/pkgs/ipykernel/package-version.txt b/build/pkgs/ipykernel/package-version.txt
-index dc0208a..a194c18 100644
---- a/build/pkgs/ipykernel/package-version.txt
-+++ b/build/pkgs/ipykernel/package-version.txt
-@@ -1 +1 @@
--6.3.1
-+6.5.1
--- 
-cgit v1.0-1-gd88e
-
-
-From 73df3fc22ba3455befb05758f813caa3dd0a010b Mon Sep 17 00:00:00 2001
-From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
-Date: Wed, 24 Nov 2021 18:28:44 -0800
-Subject: build/pkgs/ipywidgets: Update to 7.6.5
-
----
- build/pkgs/ipywidgets/checksums.ini       | 6 +++---
- build/pkgs/ipywidgets/package-version.txt | 2 +-
- 2 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/build/pkgs/ipywidgets/checksums.ini b/build/pkgs/ipywidgets/checksums.ini
-index efb9fe9..af4a04d 100644
---- a/build/pkgs/ipywidgets/checksums.ini
-+++ b/build/pkgs/ipywidgets/checksums.ini
-@@ -1,5 +1,5 @@
- tarball=ipywidgets-VERSION.tar.gz
--sha1=8ea8c8e15a4779897dc9f12cc20e29cfe5fb689f
--md5=771fd3999f93af336c6e40ae1f5c37a2
--cksum=980834502
-+sha1=ad63e99f44fd759c34ab70161e9ac8f4276294f8
-+md5=420aabfddee27fc215ad9a9c14c9c529
-+cksum=259379988
- upstream_url=https://pypi.io/packages/source/i/ipywidgets/ipywidgets-VERSION.tar.gz
-diff --git a/build/pkgs/ipywidgets/package-version.txt b/build/pkgs/ipywidgets/package-version.txt
-index b7ade06..bf43f75 100644
---- a/build/pkgs/ipywidgets/package-version.txt
-+++ b/build/pkgs/ipywidgets/package-version.txt
-@@ -1 +1 @@
--7.6.4.p0
-+7.6.5
--- 
-cgit v1.0-1-gd88e
-
-
-From 5e144e95b13005cfb2cd7e3a3b7abd70d0a902c7 Mon Sep 17 00:00:00 2001
-From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
-Date: Wed, 24 Nov 2021 18:30:04 -0800
-Subject: build/pkgs/jedi: Update to 0.18.1
-
----
- build/pkgs/jedi/checksums.ini       | 6 +++---
- build/pkgs/jedi/package-version.txt | 2 +-
- 2 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/build/pkgs/jedi/checksums.ini b/build/pkgs/jedi/checksums.ini
-index f5be931..2db629c 100644
---- a/build/pkgs/jedi/checksums.ini
-+++ b/build/pkgs/jedi/checksums.ini
-@@ -1,5 +1,5 @@
- tarball=jedi-VERSION.tar.gz
--sha1=f9acd323b88563fafb5bb4dff592794a2713a15c
--md5=72707c00e8d6d0b190a5e5664be1cac5
--cksum=620165561
-+sha1=e94444bd83b55247fd1f3d27d47cc0b148560134
-+md5=d8dba4a98a35530f7f5b461c20aff180
-+cksum=4093067035
- upstream_url=https://pypi.io/packages/source/j/jedi/jedi-VERSION.tar.gz
-diff --git a/build/pkgs/jedi/package-version.txt b/build/pkgs/jedi/package-version.txt
-index 6633391..249afd5 100644
---- a/build/pkgs/jedi/package-version.txt
-+++ b/build/pkgs/jedi/package-version.txt
-@@ -1 +1 @@
--0.18.0
-+0.18.1
--- 
-cgit v1.0-1-gd88e
-
-
-From 6347f984a697b3aecfe0ed6d2f7363c9dc3b5b65 Mon Sep 17 00:00:00 2001
-From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
-Date: Wed, 24 Nov 2021 18:30:58 -0800
-Subject: build/pkgs/prompt_toolkit: Update to 3.0.22
-
----
- build/pkgs/prompt_toolkit/checksums.ini       | 6 +++---
- build/pkgs/prompt_toolkit/package-version.txt | 2 +-
- 2 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/build/pkgs/prompt_toolkit/checksums.ini b/build/pkgs/prompt_toolkit/checksums.ini
-index 7868d1a..0e3fe14 100644
---- a/build/pkgs/prompt_toolkit/checksums.ini
-+++ b/build/pkgs/prompt_toolkit/checksums.ini
-@@ -1,5 +1,5 @@
- tarball=prompt_toolkit-VERSION.tar.gz
--sha1=20fe2a6126ee2b992d9f77cd20e4b80626b036d7
--md5=ba9e63c3e7e5a4f4ce4e4770a4daba96
--cksum=3647925903
-+sha1=5efb27677b89b2c81241645c6658e60771af3b7b
-+md5=bbaeba1142a64ecf2264eaf4f85201b1
-+cksum=1605705668
- upstream_url=https://pypi.io/packages/source/p/prompt_toolkit/prompt_toolkit-VERSION.tar.gz
-diff --git a/build/pkgs/prompt_toolkit/package-version.txt b/build/pkgs/prompt_toolkit/package-version.txt
-index 3e4a61b..6795d4d 100644
---- a/build/pkgs/prompt_toolkit/package-version.txt
-+++ b/build/pkgs/prompt_toolkit/package-version.txt
-@@ -1 +1 @@
--3.0.20
-+3.0.22
--- 
-cgit v1.0-1-gd88e
-
-
-From 28e535d3a1dd6b67e740b1900c4fad36cccd1121 Mon Sep 17 00:00:00 2001
-From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
-Date: Wed, 24 Nov 2021 18:32:02 -0800
-Subject: build/pkgs/widgetsnbextension: Update to 3.5.2
-
----
- build/pkgs/widgetsnbextension/checksums.ini       | 6 +++---
- build/pkgs/widgetsnbextension/package-version.txt | 2 +-
- 2 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/build/pkgs/widgetsnbextension/checksums.ini b/build/pkgs/widgetsnbextension/checksums.ini
-index 2f7e946..81205c5 100644
---- a/build/pkgs/widgetsnbextension/checksums.ini
-+++ b/build/pkgs/widgetsnbextension/checksums.ini
-@@ -1,5 +1,5 @@
- tarball=widgetsnbextension-VERSION.tar.gz
--sha1=f92ee894f3b08cfb6cfac0856d77521bbbf45e92
--md5=3dc5f96919c032a885950e3819bdee7b
--cksum=4195536255
-+sha1=010f70ab9a6d6e0a4f9607cce0da182ee6c1280a
-+md5=c126a06559afe658e285bcd483790710
-+cksum=160710350
- upstream_url=https://pypi.io/packages/source/w/widgetsnbextension/widgetsnbextension-VERSION.tar.gz
-diff --git a/build/pkgs/widgetsnbextension/package-version.txt b/build/pkgs/widgetsnbextension/package-version.txt
-index ffe3090..87ce492 100644
---- a/build/pkgs/widgetsnbextension/package-version.txt
-+++ b/build/pkgs/widgetsnbextension/package-version.txt
-@@ -1 +1 @@
--3.5.1.p0
-+3.5.2
--- 
-cgit v1.0-1-gd88e
-
-
-From 63078ac3e486d986d43e78f76a2037455147b8da Mon Sep 17 00:00:00 2001
-From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
-Date: Wed, 24 Nov 2021 18:33:12 -0800
-Subject: build/pkgs/terminado: Update to 0.12.1
-
----
- build/pkgs/terminado/checksums.ini       | 6 +++---
- build/pkgs/terminado/package-version.txt | 2 +-
- 2 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/build/pkgs/terminado/checksums.ini b/build/pkgs/terminado/checksums.ini
-index ba1b392..f33efd4 100644
---- a/build/pkgs/terminado/checksums.ini
-+++ b/build/pkgs/terminado/checksums.ini
-@@ -1,5 +1,5 @@
- tarball=terminado-VERSION.tar.gz
--sha1=9a4f75d9f1bad0e7eadf33da774ab4e09d75a47b
--md5=8150154423841a90b1d8ca60943ad84c
--cksum=2702442904
-+sha1=65f40480c1d8077b78dcffb7e0c909eae86998bf
-+md5=4871263f6aaed18e09603fa6785b4340
-+cksum=2070178009
- upstream_url=https://pypi.io/packages/source/t/terminado/terminado-VERSION.tar.gz
-diff --git a/build/pkgs/terminado/package-version.txt b/build/pkgs/terminado/package-version.txt
-index af88ba8..34a8361 100644
---- a/build/pkgs/terminado/package-version.txt
-+++ b/build/pkgs/terminado/package-version.txt
-@@ -1 +1 @@
--0.11.1
-+0.12.1
--- 
-cgit v1.0-1-gd88e
-
-
-From 22de5dc202d63cbcef3a752a6c68e7d99332d705 Mon Sep 17 00:00:00 2001
-From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
-Date: Wed, 24 Nov 2021 18:34:42 -0800
-Subject: build/pkgs/notebook: Update to 6.4.6
-
----
- build/pkgs/notebook/checksums.ini       | 6 +++---
- build/pkgs/notebook/package-version.txt | 2 +-
- 2 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/build/pkgs/notebook/checksums.ini b/build/pkgs/notebook/checksums.ini
-index 1355f59..29c39e9 100644
---- a/build/pkgs/notebook/checksums.ini
-+++ b/build/pkgs/notebook/checksums.ini
-@@ -1,5 +1,5 @@
- tarball=notebook-VERSION.tar.gz
--sha1=0a6d27e401d04d516c3851862491824007272dc0
--md5=718f7f0267e0111b4ef9ff3238e9f7e8
--cksum=2383141171
-+sha1=93736a3a9c5b025f71a25a301b676a40aca3124b
-+md5=ecb9319cf82a9a83b1c4c8e1cc4efbee
-+cksum=1697144622
- upstream_url=https://pypi.io/packages/source/n/notebook/notebook-VERSION.tar.gz
-diff --git a/build/pkgs/notebook/package-version.txt b/build/pkgs/notebook/package-version.txt
-index 133cad2..3d05e8c 100644
---- a/build/pkgs/notebook/package-version.txt
-+++ b/build/pkgs/notebook/package-version.txt
-@@ -1 +1 @@
--6.4.3
-+6.4.6
--- 
-cgit v1.0-1-gd88e
-
-
-From a0fe18ba460d87e0bd46ada9f4246baa49c7c251 Mon Sep 17 00:00:00 2001
-From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
-Date: Wed, 24 Nov 2021 18:35:36 -0800
-Subject: build/pkgs/nbclient: Update to 0.5.4
-
----
- build/pkgs/nbclient/checksums.ini       | 6 +++---
- build/pkgs/nbclient/package-version.txt | 2 +-
- 2 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/build/pkgs/nbclient/checksums.ini b/build/pkgs/nbclient/checksums.ini
-index 914ee93..b1f9790 100644
---- a/build/pkgs/nbclient/checksums.ini
-+++ b/build/pkgs/nbclient/checksums.ini
-@@ -1,5 +1,5 @@
- tarball=nbclient-VERSION.tar.gz
--sha1=9c1059878ae04da987ae00025908ae802cbfc066
--md5=593579773bd8128f845ea01a46ccbedb
--cksum=2389564342
-+sha1=a5efba590429270c901f4f5a16c8b46a7e6b8e4a
-+md5=a3cf8c1c121b0718a6ccf384c5683424
-+cksum=2650264415
- upstream_url=https://pypi.io/packages/source/n/nbclient/nbclient-VERSION.tar.gz
-diff --git a/build/pkgs/nbclient/package-version.txt b/build/pkgs/nbclient/package-version.txt
-index 7d85683..416bfb0 100644
---- a/build/pkgs/nbclient/package-version.txt
-+++ b/build/pkgs/nbclient/package-version.txt
-@@ -1 +1 @@
--0.5.4
-+0.5.9
--- 
-cgit v1.0-1-gd88e
-
-
-From ef3fc7f3a0877ee92dd1bf6e8d6e8c84db9f6050 Mon Sep 17 00:00:00 2001
-From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
-Date: Wed, 24 Nov 2021 18:38:02 -0800
-Subject: build/pkgs/jupyter_client: Update to 7.1.0
-
----
- build/pkgs/jupyter_client/checksums.ini       | 6 +++---
- build/pkgs/jupyter_client/package-version.txt | 2 +-
- 2 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/build/pkgs/jupyter_client/checksums.ini b/build/pkgs/jupyter_client/checksums.ini
-index ab486e6..cbe7b83 100644
---- a/build/pkgs/jupyter_client/checksums.ini
-+++ b/build/pkgs/jupyter_client/checksums.ini
-@@ -1,5 +1,5 @@
- tarball=jupyter_client-VERSION.tar.gz
--sha1=d03249e98f821ac8f43408e71b5390cef336d859
--md5=7c6ef694cde43fd365046869842a1cde
--cksum=236454943
-+sha1=aad5dd5337e20e53de66e094092333e04d9c4e1d
-+md5=33fb5eab82f3e89c68f2082b52a8e966
-+cksum=481041414
- upstream_url=https://pypi.io/packages/source/j/jupyter_client/jupyter_client-VERSION.tar.gz
-diff --git a/build/pkgs/jupyter_client/package-version.txt b/build/pkgs/jupyter_client/package-version.txt
-index a8907c0..a3fcc71 100644
---- a/build/pkgs/jupyter_client/package-version.txt
-+++ b/build/pkgs/jupyter_client/package-version.txt
-@@ -1 +1 @@
--7.0.2
-+7.1.0
--- 
-cgit v1.0-1-gd88e
-
-
-From a593bc993aa860f847b803a3d41fe7c2d5d99780 Mon Sep 17 00:00:00 2001
-From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
-Date: Wed, 24 Nov 2021 18:40:11 -0800
-Subject: build/pkgs/jupyter_core: Update to 4.9.1
-
----
- build/pkgs/jupyter_core/checksums.ini       | 6 +++---
- build/pkgs/jupyter_core/package-version.txt | 2 +-
- 2 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/build/pkgs/jupyter_core/checksums.ini b/build/pkgs/jupyter_core/checksums.ini
-index 8310cf0..f3a3068 100644
---- a/build/pkgs/jupyter_core/checksums.ini
-+++ b/build/pkgs/jupyter_core/checksums.ini
-@@ -1,5 +1,5 @@
- tarball=jupyter_core-VERSION.tar.gz
--sha1=01e57900f8e4475fb90ae533cf7ebd6f4c323867
--md5=adc204a306a7122a61aa742ccc4c252a
--cksum=1333962761
-+sha1=afa48d85b3611beb42236be3c130767a6524ccfd
-+md5=77a1e7642abfb834a6046e14b94f5c88
-+cksum=1811078933
- upstream_url=https://pypi.io/packages/source/j/jupyter_core/jupyter_core-VERSION.tar.gz
-diff --git a/build/pkgs/jupyter_core/package-version.txt b/build/pkgs/jupyter_core/package-version.txt
-index 7c66fca..5b341fd 100644
---- a/build/pkgs/jupyter_core/package-version.txt
-+++ b/build/pkgs/jupyter_core/package-version.txt
-@@ -1 +1 @@
--4.7.1
-+4.9.1
--- 
-cgit v1.0-1-gd88e
-
-
-From 66c16b14f9081c6d62f5d105cfe76b470074c187 Mon Sep 17 00:00:00 2001
-From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
-Date: Wed, 24 Nov 2021 18:41:20 -0800
-Subject: build/pkgs/importlib_metadata: Update to 4.8.2
-
----
- build/pkgs/importlib_metadata/checksums.ini       | 6 +++---
- build/pkgs/importlib_metadata/package-version.txt | 2 +-
- 2 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/build/pkgs/importlib_metadata/checksums.ini b/build/pkgs/importlib_metadata/checksums.ini
-index 4006b51..d5a9b1a 100644
---- a/build/pkgs/importlib_metadata/checksums.ini
-+++ b/build/pkgs/importlib_metadata/checksums.ini
-@@ -1,5 +1,5 @@
- tarball=importlib_metadata-VERSION.tar.gz
--sha1=1572500dd099439cbd86bb70bfe1d206fbc844f6
--md5=5b944bce3fccaf848f0cba7a07f850a1
--cksum=416853070
-+sha1=7d15d8e06299a8f24e076600899aceee75ce8b0b
-+md5=a605ba6ec315bc1324fd6b7210fe7c12
-+cksum=448954927
- upstream_url=https://pypi.io/packages/source/i/importlib_metadata/importlib_metadata-VERSION.tar.gz
-diff --git a/build/pkgs/importlib_metadata/package-version.txt b/build/pkgs/importlib_metadata/package-version.txt
-index 697e993..326ec63 100644
---- a/build/pkgs/importlib_metadata/package-version.txt
-+++ b/build/pkgs/importlib_metadata/package-version.txt
-@@ -1 +1 @@
--4.8.1
-+4.8.2
--- 
-cgit v1.0-1-gd88e
-
-
-From 27fbff02000609d9bf9c5f429b887e321148c6b6 Mon Sep 17 00:00:00 2001
-From: Antonio Rojas <arojas@archlinux.org>
-Date: Sun, 12 Dec 2021 09:57:10 +0100
-Subject: Assign module property to test class
-
-Otherwise, Python 3.10 will report a "source code not available" error, see https://github.com/python/cpython/commit/48a62559dfaf775e4f1cc56b19379c799e8e2587
----
- src/sage/misc/sageinspect.py | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/src/sage/misc/sageinspect.py b/src/sage/misc/sageinspect.py
-index fb2073f..bd89233 100644
---- a/src/sage/misc/sageinspect.py
-+++ b/src/sage/misc/sageinspect.py
-@@ -1585,6 +1585,8 @@ def sage_getargspec(obj):
-         ....:     'class Foo:\n'
-         ....:     '    def __call__(self):\n'
-         ....:     '        return None\n'
-+        ....:     '    def __module__(self):\n'
-+        ....:     '        return "sage.misc.sageinspect"\n'
-         ....:     '    def _sage_src_(self):\n'
-         ....:     '        return "the source code string"')
-         sage: shell.run_cell('f = Foo()')
--- 
-cgit v1.0-1-gd88e
-
-
-From 26c9b33878aef88a0b1e88d6664823d9d4591a5f Mon Sep 17 00:00:00 2001
-From: Antonio Rojas <arojas@archlinux.org>
-Date: Sun, 12 Dec 2021 09:59:07 +0100
-Subject: Add abs tol to some tests to make them pass with Python 3.10
-
----
- src/sage/plot/colors.py | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/src/sage/plot/colors.py b/src/sage/plot/colors.py
-index 6fdba0f..f46b736 100644
---- a/src/sage/plot/colors.py
-+++ b/src/sage/plot/colors.py
-@@ -918,12 +918,12 @@ class Color(object):
- 
-             sage: Color(0.3, 0.5, 0.7, space='hls').hls()
-             (0.30000000000000004, 0.5, 0.7)
--            sage: Color(0.3, 0.5, 0.7, space='hsl').hls()
-+            sage: Color(0.3, 0.5, 0.7, space='hsl').hls() # abs tol 1e-15
-             (0.30000000000000004, 0.7, 0.5000000000000001)
--            sage: Color('#aabbcc').hls()
-+            sage: Color('#aabbcc').hls() # abs tol 1e-15
-             (0.5833333333333334, 0.7333333333333334, 0.25000000000000017)
-             sage: from sage.plot.colors import orchid
--            sage: orchid.hls()
-+            sage: orchid.hls() # abs tol 1e-15
-             (0.8396226415094339, 0.6470588235294117, 0.5888888888888889)
-         """
-         return tuple(map(float, rgb_to_hls(*self._rgb)))
-@@ -942,9 +942,9 @@ class Color(object):
-             sage: Color(1,0,0).hsl()
-             (0.0, 1.0, 0.5)
-             sage: from sage.plot.colors import orchid
--            sage: orchid.hsl()
-+            sage: orchid.hsl() # abs tol 1e-15
-             (0.8396226415094339, 0.5888888888888889, 0.6470588235294117)
--            sage: Color('#aabbcc').hsl()
-+            sage: Color('#aabbcc').hsl() # abs tol 1e-15
-             (0.5833333333333334, 0.25000000000000017, 0.7333333333333334)
-         """
-         h, l, s = tuple(map(float, rgb_to_hls(*self._rgb)))
--- 
-cgit v1.0-1-gd88e
-
-
-From 079ceca95e5d3ad9fb81d3234df3e984ddde09d4 Mon Sep 17 00:00:00 2001
-From: Antonio Rojas <arojas@archlinux.org>
-Date: Sun, 12 Dec 2021 09:59:43 +0100
-Subject: Add missing space
-
-Surprisingly, this didn't throw an error before Python 3.10
----
- src/sage/schemes/riemann_surfaces/riemann_surface.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/sage/schemes/riemann_surfaces/riemann_surface.py b/src/sage/schemes/riemann_surfaces/riemann_surface.py
-index 3c3d387..f9d1e2b 100644
---- a/src/sage/schemes/riemann_surfaces/riemann_surface.py
-+++ b/src/sage/schemes/riemann_surfaces/riemann_surface.py
-@@ -1390,7 +1390,7 @@ class RiemannSurface(object):
-             sage: S = RiemannSurface(f)
-             sage: _ = S.homology_basis()
-             sage: g,d = S.make_zw_interpolator([(0,0),(1,0)]);
--            sage: all(f(*g(i*0.1)).abs() < 1e-13for i in range(10))
-+            sage: all(f(*g(i*0.1)).abs() < 1e-13 for i in range(10))
-             True
-             sage: abs((g(1)[0]-g(0)[0]) - d) < 1e-13
-             True
--- 
-cgit v1.0-1-gd88e
-
-
-From 6603e290fff0e49a6394e40382c4ebdc8975049d Mon Sep 17 00:00:00 2001
-From: Antonio Rojas <arojas@archlinux.org>
-Date: Sun, 12 Dec 2021 10:00:49 +0100
-Subject: Update some error messages to match Python 3.10 format
-
----
- src/sage/structure/unique_representation.py |  2 +-
- src/sage/symbolic/callable.py               | 10 +++++-----
- 2 files changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/src/sage/structure/unique_representation.py b/src/sage/structure/unique_representation.py
-index 9ead7a4..5d8d4ad 100644
---- a/src/sage/structure/unique_representation.py
-+++ b/src/sage/structure/unique_representation.py
-@@ -1221,7 +1221,7 @@ class UniqueRepresentation(CachedRepresentation, WithEqualityById):
-         sage: isinstance(GF(7), GF)
-         Traceback (most recent call last):
-         ...
--        TypeError: isinstance() arg 2 must be a type or tuple of types
-+        TypeError: isinstance() arg 2 must be a type...
- 
-         sage: isinstance(GF, sage.structure.factory.UniqueFactory)
-         True
-diff --git a/src/sage/symbolic/callable.py b/src/sage/symbolic/callable.py
-index 5f3a7be..4b8efda 100644
---- a/src/sage/symbolic/callable.py
-+++ b/src/sage/symbolic/callable.py
-@@ -38,27 +38,27 @@ The arguments in the definition must be symbolic variables (:trac:`10747`)::
-     sage: f(1)=2
-     Traceback (most recent call last):
-     ...
--    SyntaxError: can...t assign to function call
-+    SyntaxError: can...t assign to function call...
- 
-     sage: f(x,1)=2
-     Traceback (most recent call last):
-     ...
--    SyntaxError: can...t assign to function call
-+    SyntaxError: can...t assign to function call...
- 
-     sage: f(1,2)=3
-     Traceback (most recent call last):
-     ...
--    SyntaxError: can...t assign to function call
-+    SyntaxError: can...t assign to function call...
- 
-     sage: f(1,2)=x
-     Traceback (most recent call last):
-     ...
--    SyntaxError: can...t assign to function call
-+    SyntaxError: can...t assign to function call...
- 
-     sage: f(x,2)=x
-     Traceback (most recent call last):
-     ...
--    SyntaxError: can...t assign to function call
-+    SyntaxError: can...t assign to function call...
- """
- 
- import sage.rings.abc
--- 
-cgit v1.0-1-gd88e
-
-
-From f345263b8c46d72d12fb1d2482fbfbbd6f23a570 Mon Sep 17 00:00:00 2001
-From: Antonio Rojas <arojas@archlinux.org>
-Date: Sun, 12 Dec 2021 10:01:18 +0100
-Subject: Make sure the timeout passed to select.select is a float
-
-Python 3.10 does a type check
----
- src/sage/tests/cmdline.py | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/sage/tests/cmdline.py b/src/sage/tests/cmdline.py
-index 4f16b0e..ba5aa14 100644
---- a/src/sage/tests/cmdline.py
-+++ b/src/sage/tests/cmdline.py
-@@ -766,6 +766,7 @@ def test_executable(args, input="", timeout=100.0, pydebug_ignore_warnings=False
-             rfd.append(fderr)
-         if len(rfd) == 0:
-             break
-+        timeout = float(timeout)
-         rlist = select.select(rfd, [], [], timeout)[0]
- 
-         if len(rlist) == 0:
--- 
-cgit v1.0-1-gd88e
-
-
-From 2f13b8666aef7001b7464f7cf68d145a5752c067 Mon Sep 17 00:00:00 2001
-From: Antonio Rojas <arojas@archlinux.org>
-Date: Sun, 12 Dec 2021 18:30:05 +0100
-Subject: Update another error message for Python 3.10
-
----
- src/sage/rings/asymptotic/growth_group.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/sage/rings/asymptotic/growth_group.py b/src/sage/rings/asymptotic/growth_group.py
-index ba7e684..a91ec31 100644
---- a/src/sage/rings/asymptotic/growth_group.py
-+++ b/src/sage/rings/asymptotic/growth_group.py
-@@ -5434,7 +5434,7 @@ class GrowthGroupFactory(UniqueFactory):
-             describing a growth group.
-             > *previous* ValueError: Cannot create a parent out of 'as'.
-             >> *previous* ValueError: unknown specification as
--            >> *and* SyntaxError: unexpected EOF while parsing (<string>, line 1)
-+            >> *and* SyntaxError: ... (<string>, line 1)
-             > *and* ValueError: Cannot create a parent out of 'df'.
-             >> *previous* ValueError: unknown specification df
-             >> *and* NameError: name 'df' is not defined
--- 
-cgit v1.0-1-gd88e
-
-
-From e65ae6ca71fbe284affeb4ed88e63acc97a3fe0a Mon Sep 17 00:00:00 2001
-From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
-Date: Mon, 24 May 2021 17:06:47 -0700
-Subject: build/pkgs/python3/spkg-configure.m4: Accept system python 3.10.x
-
----
- build/pkgs/python3/spkg-configure.m4 | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/build/pkgs/python3/spkg-configure.m4 b/build/pkgs/python3/spkg-configure.m4
-index df74019..3cbb994 100644
---- a/build/pkgs/python3/spkg-configure.m4
-+++ b/build/pkgs/python3/spkg-configure.m4
-@@ -1,7 +1,7 @@
- SAGE_SPKG_CONFIGURE([python3], [
-    m4_pushdef([MIN_VERSION],               [3.7.0])
-    m4_pushdef([MIN_NONDEPRECATED_VERSION], [3.7.0])
--   m4_pushdef([LT_VERSION],                [3.10.0])
-+   m4_pushdef([LT_VERSION],                [3.11.0])
-    AC_ARG_WITH([python],
-                [AS_HELP_STRING([--with-python=PYTHON3],
-                                [Python 3 executable to use for the Sage venv; default: python3])])
--- 
-cgit v1.0-1-gd88e
-
-
-From 59173d01b4ed85077a847d2643c80bb3499c926a Mon Sep 17 00:00:00 2001
-From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
-Date: Wed, 15 Sep 2021 17:49:12 -0700
-Subject: pkgs/sage-setup/setup.cfg: Allow Python 3.10
-
----
- pkgs/sage-setup/setup.cfg | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/pkgs/sage-setup/setup.cfg b/pkgs/sage-setup/setup.cfg
-index a1710d4..197fc67 100644
---- a/pkgs/sage-setup/setup.cfg
-+++ b/pkgs/sage-setup/setup.cfg
-@@ -31,7 +31,7 @@ packages =
-     sage_setup.autogen.interpreters.specs
-     sage_setup.command
- 
--python_requires = >=3.7, <3.10
-+python_requires = >=3.7, <3.11
- 
- install_requires =
-     pkgconfig
--- 
-cgit v1.0-1-gd88e
-
-
-From c902b7bc44c1b2116416962ec1194b8e59f11f06 Mon Sep 17 00:00:00 2001
-From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
-Date: Fri, 17 Dec 2021 09:15:25 -0800
-Subject: src/setup.cfg.m4: Allow Python 3.10
-
----
- src/setup.cfg.m4 | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/setup.cfg.m4 b/src/setup.cfg.m4
-index 16f88f2..b8bd0c0 100644
---- a/src/setup.cfg.m4
-+++ b/src/setup.cfg.m4
-@@ -26,7 +26,7 @@ classifiers =
-     Topic :: Scientific/Engineering :: Mathematics
- 
- [options]
--python_requires = >=3.7, <3.10
-+python_requires = >=3.7, <3.11
- install_requires =
-     sage_conf
-     esyscmd(`sage-get-system-packages install-requires \
--- 
-cgit v1.0-1-gd88e
-
-
-From cb305525af1f872d00bb63387f7c68b88fb70a38 Mon Sep 17 00:00:00 2001
-From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
-Date: Fri, 17 Dec 2021 09:38:43 -0800
-Subject: build/pkgs/python3/spkg-configure.m4: Warn on system python 3.10.x
-
----
- build/pkgs/python3/spkg-configure.m4 | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/build/pkgs/python3/spkg-configure.m4 b/build/pkgs/python3/spkg-configure.m4
-index 3cbb994..5e3481a 100644
---- a/build/pkgs/python3/spkg-configure.m4
-+++ b/build/pkgs/python3/spkg-configure.m4
-@@ -1,6 +1,7 @@
- SAGE_SPKG_CONFIGURE([python3], [
-    m4_pushdef([MIN_VERSION],               [3.7.0])
-    m4_pushdef([MIN_NONDEPRECATED_VERSION], [3.7.0])
-+   m4_pushdef([LT_STABLE_VERSION],         [3.10.0])
-    m4_pushdef([LT_VERSION],                [3.11.0])
-    AC_ARG_WITH([python],
-                [AS_HELP_STRING([--with-python=PYTHON3],
-@@ -116,6 +117,10 @@ and will be removed in the next development cycle.  Consider using a newer versi
- that may be available on your system or can be installed using the system package manager.
- To build Sage with a different system python, use ./configure --with-python=/path/to/python])
-         ])
-+        AX_COMPARE_VERSION([$python3_version], [ge], LT_STABLE_VERSION, [
-+            AC_MSG_WARN([Support for system python >= LT_STABLE_VERSION is experimental.
-+To build Sage with a different system python, use ./configure --with-python=/path/to/python])
-+        ])
-     ])
-     AC_SUBST([PYTHON_FOR_VENV])
- 
--- 
-cgit v1.0-1-gd88e
-
-
-From 249357dd30c54162e4b9204d6113c70b310a5087 Mon Sep 17 00:00:00 2001
-From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
-Date: Sat, 18 Dec 2021 13:35:21 -0800
-Subject: sage.cpython.atexit: fix for python 3.10 (#30766)
-
----
- src/sage/cpython/atexit.pyx | 75 +++++++++++++++++++++++++++++----------------
- 1 file changed, 48 insertions(+), 27 deletions(-)
-
-diff --git a/src/sage/cpython/atexit.pyx b/src/sage/cpython/atexit.pyx
-index 5b0c6d1..3ba391b 100644
---- a/src/sage/cpython/atexit.pyx
-+++ b/src/sage/cpython/atexit.pyx
-@@ -144,43 +144,63 @@ cdef class restore_atexit:
- 
- from cpython.ref cimport PyObject
- 
--# Internal structures defined in the CPython source in
--# Modules/atexitmodule.c and subject to (but unlikely to) change.  Watch
--# https://bugs.python.org/issue32082 for a request to (eventually)
--# re-expose more of the atexit module's internals to Python
--ctypedef struct atexit_callback:
--    PyObject* func
--    PyObject* args
--    PyObject* kwargs
--
--
--ctypedef struct atexitmodule_state:
--    atexit_callback** atexit_callbacks
--    int ncallbacks
--    int callback_len
--
--
--cdef extern from "Python.h":
--    void* PyModule_GetState(object module)
--
-+# Implement "_atexit_callbacks()" for each supported python version
-+cdef extern from *:
-+    """
-+    #if PY_VERSION_HEX >= 0x030a0000
-+    /********** Python 3.10 **********/
-+    #define Py_BUILD_CORE
-+    #undef _PyGC_FINALIZED
-+    #include "internal/pycore_interp.h"
-+    #include "internal/pycore_pystate.h"
-+    static atexit_callback ** _atexit_callbacks(PyObject *self) {
-+        PyInterpreterState *interp = _PyInterpreterState_GET();
-+        struct atexit_state state = interp->atexit;
-+        return state.callbacks;
-+    }
-+    #else
-+    /********** Python < 3.10 **********/
-+    /* Internal structures defined in the CPython source in
-+     * Modules/atexitmodule.c and subject to (but unlikely to) change.  Watch
-+     * https://bugs.python.org/issue32082 for a request to (eventually)
-+     * re-expose more of the atexit module's internals to Python
-+     * typedef struct
-+     */
-+    typedef struct {
-+        PyObject *func;
-+        PyObject *args;
-+        PyObject *kwargs;
-+    } atexit_callback;
-+    typedef struct {
-+        atexit_callback **atexit_callbacks;
-+        int ncallbacks;
-+        int callback_len;
-+    } atexitmodule_state;
-+    static atexit_callback ** _atexit_callbacks(PyObject *self) {
-+        atexitmodule_state *state = PyModule_GetState(self);
-+        return state->atexit_callbacks;
-+    }
-+    #endif
-+    """
-+    ctypedef struct atexit_callback:
-+        PyObject* func
-+        PyObject* args
-+        PyObject* kwargs
-+    atexit_callback** _atexit_callbacks(object module)
- 
- def _get_exithandlers():
-     """Return list of exit handlers registered with the atexit module."""
--    cdef atexitmodule_state* state
-+    cdef atexit_callback ** callbacks
-     cdef atexit_callback callback
-     cdef list exithandlers
-     cdef int idx
-     cdef object kwargs
- 
--    state = <atexitmodule_state*>PyModule_GetState(atexit)
--
--    if not state:
--        raise RuntimeError("atexit module state missing or corrupt")
--
-     exithandlers = []
-+    callbacks = _atexit_callbacks(atexit)
- 
--    for idx in range(state.ncallbacks):
--        callback = state.atexit_callbacks[idx][0]
-+    for idx in range(atexit._ncallbacks()):
-+        callback = callbacks[idx][0]
-         if callback.kwargs:
-             kwargs = <object>callback.kwargs
-         else:
-@@ -207,4 +227,5 @@ def _set_exithandlers(exithandlers):
- 
- def _clear_exithandlers():
-     """Clear the atexit module of all registered exit handlers."""
-+
-     atexit._clear()
--- 
-cgit v1.0-1-gd88e
-
-
-From df9f1d4ced4264f65ab704f725f6f5879b012796 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
-Date: Sun, 19 Dec 2021 22:36:44 -0300
-Subject: Pass float(0.5) to time.sleep
-
-Since python 3.10, passing RealNumber breaks.
----
- src/sage_docbuild/utils.py | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/sage_docbuild/utils.py b/src/sage_docbuild/utils.py
-index 956d703f..3e4793e 100644
---- a/src/sage_docbuild/utils.py
-+++ b/src/sage_docbuild/utils.py
-@@ -79,7 +79,7 @@ def build_many(target, args, processes=None):
-         ....:         # Task 4 is a poison pill
-         ....:         1 / 0
-         ....:     else:
--        ....:         time.sleep(0.5)
-+        ....:         time.sleep(float(0.5))
-         ....:         print('Processed task %s' % N)
-         ....:
- 
-@@ -104,7 +104,7 @@ def build_many(target, args, processes=None):
-         ....:         # Task 4 is a poison pill
-         ....:         os.kill(os.getpid(), signal.SIGKILL)
-         ....:     else:
--        ....:         time.sleep(0.5)
-+        ....:         time.sleep(float(0.5))
-         ....:         print('Processed task %s' % N)
-         ....:
-         sage: build_many(target, range(8), processes=8)
--- 
-cgit v1.0-1-gd88e
-
diff --git a/srcpkgs/sagemath/patches/trac-30766-system_python_3.10-df9f1d4ced4264f65ab704f725f6f5879b012796.patch b/srcpkgs/sagemath/patches/trac-30766-system_python_3.10-df9f1d4ced4264f65ab704f725f6f5879b012796.patch
new file mode 100644
index 000000000000..a1cb4c834482
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-30766-system_python_3.10-df9f1d4ced4264f65ab704f725f6f5879b012796.patch
@@ -0,0 +1,263 @@
+From e65ae6ca71fbe284affeb4ed88e63acc97a3fe0a Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Mon, 24 May 2021 17:06:47 -0700
+Subject: build/pkgs/python3/spkg-configure.m4: Accept system python 3.10.x
+
+---
+ build/pkgs/python3/spkg-configure.m4 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/build/pkgs/python3/spkg-configure.m4 b/build/pkgs/python3/spkg-configure.m4
+index df74019..3cbb994 100644
+--- a/build/pkgs/python3/spkg-configure.m4
++++ b/build/pkgs/python3/spkg-configure.m4
+@@ -1,7 +1,7 @@
+ SAGE_SPKG_CONFIGURE([python3], [
+    m4_pushdef([MIN_VERSION],               [3.7.0])
+    m4_pushdef([MIN_NONDEPRECATED_VERSION], [3.7.0])
+-   m4_pushdef([LT_VERSION],                [3.10.0])
++   m4_pushdef([LT_VERSION],                [3.11.0])
+    AC_ARG_WITH([python],
+                [AS_HELP_STRING([--with-python=PYTHON3],
+                                [Python 3 executable to use for the Sage venv; default: python3])])
+-- 
+cgit v1.0-1-gd88e
+
+
+From 59173d01b4ed85077a847d2643c80bb3499c926a Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Wed, 15 Sep 2021 17:49:12 -0700
+Subject: pkgs/sage-setup/setup.cfg: Allow Python 3.10
+
+---
+ pkgs/sage-setup/setup.cfg | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/pkgs/sage-setup/setup.cfg b/pkgs/sage-setup/setup.cfg
+index a1710d4..197fc67 100644
+--- a/pkgs/sage-setup/setup.cfg
++++ b/pkgs/sage-setup/setup.cfg
+@@ -31,7 +31,7 @@ packages =
+     sage_setup.autogen.interpreters.specs
+     sage_setup.command
+ 
+-python_requires = >=3.7, <3.10
++python_requires = >=3.7, <3.11
+ 
+ install_requires =
+     pkgconfig
+-- 
+cgit v1.0-1-gd88e
+
+
+From c902b7bc44c1b2116416962ec1194b8e59f11f06 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Fri, 17 Dec 2021 09:15:25 -0800
+Subject: src/setup.cfg.m4: Allow Python 3.10
+
+---
+ src/setup.cfg.m4 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/setup.cfg.m4 b/src/setup.cfg.m4
+index 16f88f2..b8bd0c0 100644
+--- a/src/setup.cfg.m4
++++ b/src/setup.cfg.m4
+@@ -26,7 +26,7 @@ classifiers =
+     Topic :: Scientific/Engineering :: Mathematics
+ 
+ [options]
+-python_requires = >=3.7, <3.10
++python_requires = >=3.7, <3.11
+ install_requires =
+     sage_conf
+     esyscmd(`sage-get-system-packages install-requires \
+-- 
+cgit v1.0-1-gd88e
+
+
+From cb305525af1f872d00bb63387f7c68b88fb70a38 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Fri, 17 Dec 2021 09:38:43 -0800
+Subject: build/pkgs/python3/spkg-configure.m4: Warn on system python 3.10.x
+
+---
+ build/pkgs/python3/spkg-configure.m4 | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/build/pkgs/python3/spkg-configure.m4 b/build/pkgs/python3/spkg-configure.m4
+index 3cbb994..5e3481a 100644
+--- a/build/pkgs/python3/spkg-configure.m4
++++ b/build/pkgs/python3/spkg-configure.m4
+@@ -1,6 +1,7 @@
+ SAGE_SPKG_CONFIGURE([python3], [
+    m4_pushdef([MIN_VERSION],               [3.7.0])
+    m4_pushdef([MIN_NONDEPRECATED_VERSION], [3.7.0])
++   m4_pushdef([LT_STABLE_VERSION],         [3.10.0])
+    m4_pushdef([LT_VERSION],                [3.11.0])
+    AC_ARG_WITH([python],
+                [AS_HELP_STRING([--with-python=PYTHON3],
+@@ -116,6 +117,10 @@ and will be removed in the next development cycle.  Consider using a newer versi
+ that may be available on your system or can be installed using the system package manager.
+ To build Sage with a different system python, use ./configure --with-python=/path/to/python])
+         ])
++        AX_COMPARE_VERSION([$python3_version], [ge], LT_STABLE_VERSION, [
++            AC_MSG_WARN([Support for system python >= LT_STABLE_VERSION is experimental.
++To build Sage with a different system python, use ./configure --with-python=/path/to/python])
++        ])
+     ])
+     AC_SUBST([PYTHON_FOR_VENV])
+ 
+-- 
+cgit v1.0-1-gd88e
+
+
+From 249357dd30c54162e4b9204d6113c70b310a5087 Mon Sep 17 00:00:00 2001
+From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
+Date: Sat, 18 Dec 2021 13:35:21 -0800
+Subject: sage.cpython.atexit: fix for python 3.10 (#30766)
+
+---
+ src/sage/cpython/atexit.pyx | 75 +++++++++++++++++++++++++++++----------------
+ 1 file changed, 48 insertions(+), 27 deletions(-)
+
+diff --git a/src/sage/cpython/atexit.pyx b/src/sage/cpython/atexit.pyx
+index 5b0c6d1..3ba391b 100644
+--- a/src/sage/cpython/atexit.pyx
++++ b/src/sage/cpython/atexit.pyx
+@@ -144,43 +144,63 @@ cdef class restore_atexit:
+ 
+ from cpython.ref cimport PyObject
+ 
+-# Internal structures defined in the CPython source in
+-# Modules/atexitmodule.c and subject to (but unlikely to) change.  Watch
+-# https://bugs.python.org/issue32082 for a request to (eventually)
+-# re-expose more of the atexit module's internals to Python
+-ctypedef struct atexit_callback:
+-    PyObject* func
+-    PyObject* args
+-    PyObject* kwargs
+-
+-
+-ctypedef struct atexitmodule_state:
+-    atexit_callback** atexit_callbacks
+-    int ncallbacks
+-    int callback_len
+-
+-
+-cdef extern from "Python.h":
+-    void* PyModule_GetState(object module)
+-
++# Implement "_atexit_callbacks()" for each supported python version
++cdef extern from *:
++    """
++    #if PY_VERSION_HEX >= 0x030a0000
++    /********** Python 3.10 **********/
++    #define Py_BUILD_CORE
++    #undef _PyGC_FINALIZED
++    #include "internal/pycore_interp.h"
++    #include "internal/pycore_pystate.h"
++    static atexit_callback ** _atexit_callbacks(PyObject *self) {
++        PyInterpreterState *interp = _PyInterpreterState_GET();
++        struct atexit_state state = interp->atexit;
++        return state.callbacks;
++    }
++    #else
++    /********** Python < 3.10 **********/
++    /* Internal structures defined in the CPython source in
++     * Modules/atexitmodule.c and subject to (but unlikely to) change.  Watch
++     * https://bugs.python.org/issue32082 for a request to (eventually)
++     * re-expose more of the atexit module's internals to Python
++     * typedef struct
++     */
++    typedef struct {
++        PyObject *func;
++        PyObject *args;
++        PyObject *kwargs;
++    } atexit_callback;
++    typedef struct {
++        atexit_callback **atexit_callbacks;
++        int ncallbacks;
++        int callback_len;
++    } atexitmodule_state;
++    static atexit_callback ** _atexit_callbacks(PyObject *self) {
++        atexitmodule_state *state = PyModule_GetState(self);
++        return state->atexit_callbacks;
++    }
++    #endif
++    """
++    ctypedef struct atexit_callback:
++        PyObject* func
++        PyObject* args
++        PyObject* kwargs
++    atexit_callback** _atexit_callbacks(object module)
+ 
+ def _get_exithandlers():
+     """Return list of exit handlers registered with the atexit module."""
+-    cdef atexitmodule_state* state
++    cdef atexit_callback ** callbacks
+     cdef atexit_callback callback
+     cdef list exithandlers
+     cdef int idx
+     cdef object kwargs
+ 
+-    state = <atexitmodule_state*>PyModule_GetState(atexit)
+-
+-    if not state:
+-        raise RuntimeError("atexit module state missing or corrupt")
+-
+     exithandlers = []
++    callbacks = _atexit_callbacks(atexit)
+ 
+-    for idx in range(state.ncallbacks):
+-        callback = state.atexit_callbacks[idx][0]
++    for idx in range(atexit._ncallbacks()):
++        callback = callbacks[idx][0]
+         if callback.kwargs:
+             kwargs = <object>callback.kwargs
+         else:
+@@ -207,4 +227,5 @@ def _set_exithandlers(exithandlers):
+ 
+ def _clear_exithandlers():
+     """Clear the atexit module of all registered exit handlers."""
++
+     atexit._clear()
+-- 
+cgit v1.0-1-gd88e
+
+
+From df9f1d4ced4264f65ab704f725f6f5879b012796 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Sun, 19 Dec 2021 22:36:44 -0300
+Subject: Pass float(0.5) to time.sleep
+
+Since python 3.10, passing RealNumber breaks.
+---
+ src/sage_docbuild/utils.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/sage_docbuild/utils.py b/src/sage_docbuild/utils.py
+index 956d703f..3e4793e 100644
+--- a/src/sage_docbuild/utils.py
++++ b/src/sage_docbuild/utils.py
+@@ -79,7 +79,7 @@ def build_many(target, args, processes=None):
+         ....:         # Task 4 is a poison pill
+         ....:         1 / 0
+         ....:     else:
+-        ....:         time.sleep(0.5)
++        ....:         time.sleep(float(0.5))
+         ....:         print('Processed task %s' % N)
+         ....:
+ 
+@@ -104,7 +104,7 @@ def build_many(target, args, processes=None):
+         ....:         # Task 4 is a poison pill
+         ....:         os.kill(os.getpid(), signal.SIGKILL)
+         ....:     else:
+-        ....:         time.sleep(0.5)
++        ....:         time.sleep(float(0.5))
+         ....:         print('Processed task %s' % N)
+         ....:
+         sage: build_many(target, range(8), processes=8)
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/trac-32880-17e308fd9d56d022ed28592f93f07ec8dce530ef.patch b/srcpkgs/sagemath/patches/trac-32880-17e308fd9d56d022ed28592f93f07ec8dce530ef.patch
deleted file mode 100644
index e295bb91af5b..000000000000
--- a/srcpkgs/sagemath/patches/trac-32880-17e308fd9d56d022ed28592f93f07ec8dce530ef.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 17e308fd9d56d022ed28592f93f07ec8dce530ef Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Mon, 15 Nov 2021 23:37:15 -0500
-Subject: Trac #32880: use GAP instead of Singular to test
- _get_shared_lib_path().
-
-We still have a doctest for _get_shared_lib_path() that tries to find
-the path to libSingular; however, we no longer actually need it to
-find libSingular because the path to libSingular is contained in
-LIBSINGULAR_PATH.
-
-Since _get_shared_lib_path() is a bit fragile, this commit replaces
-that test case with one for libgap, which is still always installed
-via SPKG and for which we still need _get_shared_lib_path() to be able
-to find the path.
----
- src/sage/env.py | 12 ++----------
- 1 file changed, 2 insertions(+), 10 deletions(-)
-
-diff --git a/src/sage/env.py b/src/sage/env.py
-index 40ace13..3bd4826 100644
---- a/src/sage/env.py
-+++ b/src/sage/env.py
-@@ -267,20 +267,12 @@ def _get_shared_lib_path(*libnames: str) -> Optional[str]:
- 
-     EXAMPLES::
- 
--        sage: import sys
--        sage: from fnmatch import fnmatch
-         sage: from sage.env import _get_shared_lib_path
--        sage: lib_filename = _get_shared_lib_path("Singular", "singular-Singular")
--        sage: if sys.platform == 'cygwin':
--        ....:     pattern = "*/cygSingular-*.dll"
--        ....: elif sys.platform == 'darwin':
--        ....:     pattern = "*/libSingular-*.dylib"
--        ....: else:
--        ....:     pattern = "*/lib*Singular-*.so"
--        sage: fnmatch(str(lib_filename), pattern)
-+        sage: "gap" in _get_shared_lib_path("gap")
-         True
-         sage: _get_shared_lib_path("an_absurd_lib") is None
-         True
-+
-     """
- 
-     for libname in libnames:
--- 
-cgit v1.0-1-gd88e
-
diff --git a/srcpkgs/sagemath/patches/trac-32905-2ee7b99e0270f80cf03b80418372f45274f46051.patch b/srcpkgs/sagemath/patches/trac-32905-2ee7b99e0270f80cf03b80418372f45274f46051.patch
deleted file mode 100644
index 32e641edb3aa..000000000000
--- a/srcpkgs/sagemath/patches/trac-32905-2ee7b99e0270f80cf03b80418372f45274f46051.patch
+++ /dev/null
@@ -1,163 +0,0 @@
-From 2ee7b99e0270f80cf03b80418372f45274f46051 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Samuel=20Leli=C3=A8vre?= <samuel.lelievre@gmail.com>
-Date: Sat, 20 Nov 2021 13:34:16 +0100
-Subject: 32905: abs tol for some CBF and RBF doctests
-
----
- src/sage/functions/gamma.py    |  2 +-
- src/sage/rings/complex_arb.pyx |  6 +++---
- src/sage/rings/real_arb.pyx    | 24 ++++++++++++------------
- src/sage/symbolic/function.pyx |  2 +-
- 4 files changed, 17 insertions(+), 17 deletions(-)
-
-diff --git a/src/sage/functions/gamma.py b/src/sage/functions/gamma.py
-index 3a4deef..307deb1 100644
---- a/src/sage/functions/gamma.py
-+++ b/src/sage/functions/gamma.py
-@@ -1049,7 +1049,7 @@ class Function_beta(GinacFunction):
-         r"""
-         TESTS::
- 
--            sage: RBF(beta(sin(3),sqrt(RBF(2).add_error(1e-8)/3)))
-+            sage: RBF(beta(sin(3),sqrt(RBF(2).add_error(1e-8)/3)))  # abs tol 6e-7
-             [7.407662 +/- 6.17e-7]
-         """
-         return [x, y]
-diff --git a/src/sage/rings/complex_arb.pyx b/src/sage/rings/complex_arb.pyx
-index ce9b1b1..7e10ec9 100644
---- a/src/sage/rings/complex_arb.pyx
-+++ b/src/sage/rings/complex_arb.pyx
-@@ -4189,7 +4189,7 @@ cdef class ComplexBall(RingElement):
- 
-         TESTS:
- 
--            sage: CBF(Ei(I))
-+            sage: CBF(Ei(I))  # abs tol 1e-16
-             [0.337403922900968 +/- 3.76e-16] + [2.51687939716208 +/- 2.01e-15]*I
-         """
-         cdef ComplexBall result = self._new()
-@@ -4239,7 +4239,7 @@ cdef class ComplexBall(RingElement):
- 
-         TESTS:
- 
--            sage: CBF(Ci(I))
-+            sage: CBF(Ci(I))  # abs tol 1e-17
-             [0.837866940980208 +/- 4.72e-16] + [1.570796326794897 +/- 5.54e-16]*I
-         """
-         cdef ComplexBall result = self._new()
-@@ -4291,7 +4291,7 @@ cdef class ComplexBall(RingElement):
- 
-         TESTS:
- 
--            sage: CBF(Chi(I))
-+            sage: CBF(Chi(I))  # abs tol 1e-16
-             [0.337403922900968 +/- 3.25e-16] + [1.570796326794897 +/- 5.54e-16]*I
-         """
-         cdef ComplexBall result = self._new()
-diff --git a/src/sage/rings/real_arb.pyx b/src/sage/rings/real_arb.pyx
-index 80a840e..49caa63 100644
---- a/src/sage/rings/real_arb.pyx
-+++ b/src/sage/rings/real_arb.pyx
-@@ -3489,12 +3489,12 @@ cdef class RealBall(RingElement):
- 
-         EXAMPLES::
- 
--            sage: RBF(1).Ei()
-+            sage: RBF(1).Ei()  # abs tol 5e-16
-             [1.89511781635594 +/- 4.94e-15]
- 
-         TESTS::
- 
--            sage: RBF(Ei(1))
-+            sage: RBF(Ei(1))  # abs tol 5e-16
-             [1.89511781635594 +/- 4.94e-15]
-         """
-         cdef RealBall res = self._new()
-@@ -3531,12 +3531,12 @@ cdef class RealBall(RingElement):
- 
-         EXAMPLES::
- 
--            sage: RBF(1).Ci()
-+            sage: RBF(1).Ci()  # abs tol 1e-16
-             [0.337403922900968 +/- 3.25e-16]
- 
-         TESTS::
- 
--            sage: RBF(Ci(1))
-+            sage: RBF(Ci(1))  # abs tol 1e-16
-             [0.337403922900968 +/- 3.25e-16]
-         """
-         cdef RealBall res = self._new()
-@@ -3575,12 +3575,12 @@ cdef class RealBall(RingElement):
- 
-         EXAMPLES::
- 
--            sage: RBF(1).Chi()
-+            sage: RBF(1).Chi()  # abs tol 1e-17
-             [0.837866940980208 +/- 4.72e-16]
- 
-         TESTS::
- 
--            sage: RBF(Chi(1))
-+            sage: RBF(Chi(1))  # abs tol 1e-17
-             [0.837866940980208 +/- 4.72e-16]
-         """
-         cdef RealBall res = self._new()
-@@ -3597,7 +3597,7 @@ cdef class RealBall(RingElement):
- 
-         EXAMPLES::
- 
--            sage: RBF(3).li()
-+            sage: RBF(3).li()  # abs tol 1e-15
-             [2.16358859466719 +/- 4.72e-15]
- 
-         TESTS::
-@@ -3621,7 +3621,7 @@ cdef class RealBall(RingElement):
- 
-         EXAMPLES::
- 
--            sage: RBF(3).Li()
-+            sage: RBF(3).Li()  # abs tol 1e-15
-             [1.11842481454970 +/- 7.61e-15]
-         """
-         cdef RealBall res = self._new()
-@@ -3648,9 +3648,9 @@ cdef class RealBall(RingElement):
- 
-         EXAMPLES::
- 
--            sage: RBF(sin(3)).beta(RBF(2/3).sqrt())
-+            sage: RBF(sin(3)).beta(RBF(2/3).sqrt())  # abs tol 1e-13
-             [7.407661629415 +/- 1.07e-13]
--            sage: RealBallField(100)(7/2).beta(1)
-+            sage: RealBallField(100)(7/2).beta(1)  # abs tol 1e-30
-             [0.28571428571428571428571428571 +/- 5.23e-30]
-             sage: RealBallField(100)(7/2).beta(1, 1/2)
-             [0.025253813613805268728601584361 +/- 2.53e-31]
-@@ -3685,9 +3685,9 @@ cdef class RealBall(RingElement):
- 
-             sage: RBF(1/2).gamma()
-             [1.772453850905516 +/- ...e-16]
--            sage: RBF(gamma(3/2, RBF(2).sqrt()))
-+            sage: RBF(gamma(3/2, RBF(2).sqrt()))  # abs tol 2e-17
-             [0.37118875695353 +/- 3.00e-15]
--            sage: RBF(3/2).gamma_inc(RBF(2).sqrt())
-+            sage: RBF(3/2).gamma_inc(RBF(2).sqrt())  # abs tol 2e-17
-             [0.37118875695353 +/- 3.00e-15]
- 
-         .. SEEALSO::
-diff --git a/src/sage/symbolic/function.pyx b/src/sage/symbolic/function.pyx
-index 89cdce5..480a601 100644
---- a/src/sage/symbolic/function.pyx
-+++ b/src/sage/symbolic/function.pyx
-@@ -626,7 +626,7 @@ cdef class Function(SageObject):
-             sage: b = RBF(3/2, 1e-10)
-             sage: airy_ai(b)
-             airy_ai([1.500000000 +/- 1.01e-10])
--            sage: gamma(b, 1)
-+            sage: gamma(b, 1)  # abs tol 4.5e-9
-             [0.50728223 +/- 4.67e-9]
-             sage: hurwitz_zeta(b, b)
-             hurwitz_zeta([1.500000000 +/- 1.01e-10], [1.500000000 +/- 1.01e-10])
--- 
-cgit v1.0-1-gd88e
-
diff --git a/srcpkgs/sagemath/patches/trac-32964-speed_up_doctest_orthogonal_polys-2aef840b4f066a206cca26c54a8206740a8f6c66.patch b/srcpkgs/sagemath/patches/trac-32964-speed_up_doctest_orthogonal_polys-2aef840b4f066a206cca26c54a8206740a8f6c66.patch
deleted file mode 100644
index 97bba8fba0f5..000000000000
--- a/srcpkgs/sagemath/patches/trac-32964-speed_up_doctest_orthogonal_polys-2aef840b4f066a206cca26c54a8206740a8f6c66.patch
+++ /dev/null
@@ -1,151 +0,0 @@
-From e713a4f9601a066a42174db4a55cb62aee603840 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Fri, 3 Dec 2021 21:20:34 -0500
-Subject: Trac #32964: speed up a very slow doctest in
- functions.orthogonal_polys.
-
-I've got 99 problems, and they're slow. One doctest in this module is
-repeating a random test 100 times, taking over four minutes on my
-machine. More tests are better, but in this case, coverage will
-eventually accrue from the number of testers even if we only repeat
-the test once within the file.
-
-Since this particular test is an EXAMPLE, I've also made it a bit more
-user-friendly while eliminating the additional runs.
-
-message for your changes. Lines starting # with '#' will be ignored,
-and an empty message aborts the commit.  # # On branch
-u/mjo/ticket/32964 # Changes to be committed: # modified:
-src/sage/functions/orthogonal_polys.py #
----
- src/sage/functions/orthogonal_polys.py | 11 +++++++----
- 1 file changed, 7 insertions(+), 4 deletions(-)
-
-diff --git a/src/sage/functions/orthogonal_polys.py b/src/sage/functions/orthogonal_polys.py
-index de8a18b..522933e 100644
---- a/src/sage/functions/orthogonal_polys.py
-+++ b/src/sage/functions/orthogonal_polys.py
-@@ -2081,10 +2081,13 @@ class Func_ultraspherical(GinacFunction):
-         sage: gegenbauer(3,2,t)
-         32*t^3 - 12*t
-         sage: _ = var('x')
--        sage: for N in range(100):
--        ....:     n = ZZ.random_element(5, 5001)
--        ....:     a = QQ.random_element().abs() + 5
--        ....:     assert ((n+1)*ultraspherical(n+1,a,x) - 2*x*(n+a)*ultraspherical(n,a,x) + (n+2*a-1)*ultraspherical(n-1,a,x)).expand().is_zero()
-+        sage: n = ZZ.random_element(5, 5001)
-+        sage: a = QQ.random_element().abs() + 5
-+        sage: s = (  (n+1)*ultraspherical(n+1,a,x)
-+        ....:      - 2*x*(n+a)*ultraspherical(n,a,x)
-+        ....:      + (n+2*a-1)*ultraspherical(n-1,a,x) )
-+        sage: s.expand().is_zero()
-+        True
-         sage: ultraspherical(5,9/10,3.1416)
-         6949.55439044240
-         sage: ultraspherical(5,9/10,RealField(100)(pi))
--- 
-cgit v1.0-1-gd88e
-
-
-From a2343424267d7357c1ab6bec706e3447d6280687 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Fri, 3 Dec 2021 21:30:57 -0500
-Subject: Trac #32964: replace some uses of var() with SR.var().
-
-This is unrelated to the main purpose of ticket 32964, but while I was
-editing this file, I noticed that several examples use var() to inject
-symbolic expressions into the current scope. This commit changes them
-to use the preferred form `x = SR.var('x')` whose side-effects are
-much easier to predict.
----
- src/sage/functions/orthogonal_polys.py | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/src/sage/functions/orthogonal_polys.py b/src/sage/functions/orthogonal_polys.py
-index 522933e..cd845a5 100644
---- a/src/sage/functions/orthogonal_polys.py
-+++ b/src/sage/functions/orthogonal_polys.py
-@@ -1911,7 +1911,7 @@ class Func_hermite(GinacFunction):
-         ...
-         RuntimeError: hermite_eval: The index n must be a nonnegative integer
- 
--        sage: _ = var('m x')
-+        sage: m,x = SR.var('m,x')
-         sage: hermite(m, x).diff(m)
-         Traceback (most recent call last):
-         ...
-@@ -1962,7 +1962,7 @@ class Func_jacobi_P(OrthogonalFunction):
- 
-         EXAMPLES::
- 
--            sage: _ = var('n a b x')
-+            sage: n,a,b,x = SR.var('n,a,b,x')
-             sage: loads(dumps(jacobi_P))
-             jacobi_P
-             sage: jacobi_P(n, a, b, x, hold=True)._sympy_()
-@@ -1976,7 +1976,7 @@ class Func_jacobi_P(OrthogonalFunction):
-         """
-         EXAMPLES::
- 
--            sage: _ = var('n a b x')
-+            sage: n,a,b,x = SR.var('n,a,b,x')
-             sage: jacobi_P(1,n,n,n)
-             (n + 1)*n
-             sage: jacobi_P(2,n,n,n)
-@@ -2080,7 +2080,7 @@ class Func_ultraspherical(GinacFunction):
-         sage: t = PolynomialRing(RationalField(),"t").gen()
-         sage: gegenbauer(3,2,t)
-         32*t^3 - 12*t
--        sage: _ = var('x')
-+        sage: x = SR.var('x')
-         sage: n = ZZ.random_element(5, 5001)
-         sage: a = QQ.random_element().abs() + 5
-         sage: s = (  (n+1)*ultraspherical(n+1,a,x)
-@@ -2093,7 +2093,7 @@ class Func_ultraspherical(GinacFunction):
-         sage: ultraspherical(5,9/10,RealField(100)(pi))
-         6949.4695419382702451843080687
- 
--        sage: _ = var('a n')
-+        sage: a,n = SR.var('a,n')
-         sage: gegenbauer(2,a,x)
-         2*(a + 1)*a*x^2 - a
-         sage: gegenbauer(3,a,x)
--- 
-cgit v1.0-1-gd88e
-
-
-From 9b2f042147b4d25c5d7e1776bfb4b5c76db9d97b Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Fri, 3 Dec 2021 21:39:43 -0500
-Subject: Trac #32964: fix failing doctest in functions.orthogonal_polys.
-
-One of the examples in this module is expecting a doctest warning, but
-that warning is only emitted the first time it happens. When testing
-with
-
-  sage -t --file-iterations=2
-
-the warning does not appear in the second pass, and the test (that is
-expecting it) fails. This commit adds some more "..." to support both
-possible outcomes.
----
- src/sage/functions/orthogonal_polys.py | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/src/sage/functions/orthogonal_polys.py b/src/sage/functions/orthogonal_polys.py
-index cd845a5..beb4f2d 100644
---- a/src/sage/functions/orthogonal_polys.py
-+++ b/src/sage/functions/orthogonal_polys.py
-@@ -495,8 +495,7 @@ class ChebyshevFunction(OrthogonalFunction):
-             sage: chebyshev_T(5,Qp(3)(2))
-             2 + 3^2 + 3^3 + 3^4 + 3^5 + O(3^20)
-             sage: chebyshev_T(100001/2, 2)
--            doctest:...: RuntimeWarning: mpmath failed, keeping expression unevaluated
--            chebyshev_T(100001/2, 2)
-+            ...chebyshev_T(100001/2, 2)
-             sage: chebyshev_U._eval_(1.5, Mod(8,9)) is None
-             True
-         """
--- 
-cgit v1.0-1-gd88e
-
diff --git a/srcpkgs/sagemath/patches/trac-33020-update_ipykernel_to_6.6.0-715277cfadd7b3872ad6f7001fe84fb7568c947c.patch b/srcpkgs/sagemath/patches/trac-33020-update_ipykernel_to_6.6.0-715277cfadd7b3872ad6f7001fe84fb7568c947c.patch
deleted file mode 100644
index 9cb11b381ea2..000000000000
--- a/srcpkgs/sagemath/patches/trac-33020-update_ipykernel_to_6.6.0-715277cfadd7b3872ad6f7001fe84fb7568c947c.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-From 715277cfadd7b3872ad6f7001fe84fb7568c947c Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
-Date: Mon, 13 Dec 2021 18:04:04 -0300
-Subject: update ipykernel and make debugpy optional
-
- - update ipykernel to 6.6.0, for which debugpy is optional
- - patch out debugpy from pyproject.toml and setup.py
- - make debugpy optional for sagemath
----
- build/pkgs/debugpy/type                             |  2 +-
- build/pkgs/ipykernel/checksums.ini                  |  6 +++---
- build/pkgs/ipykernel/dependencies                   |  2 +-
- build/pkgs/ipykernel/package-version.txt            |  2 +-
- .../ipykernel/patches/debugpy-make-optional.patch   | 21 +++++++++++++++++++++
- 5 files changed, 27 insertions(+), 6 deletions(-)
- create mode 100644 build/pkgs/ipykernel/patches/debugpy-make-optional.patch
-
-diff --git a/build/pkgs/debugpy/type b/build/pkgs/debugpy/type
-index a6a7b9c..134d9bc 100644
---- a/build/pkgs/debugpy/type
-+++ b/build/pkgs/debugpy/type
-@@ -1 +1 @@
--standard
-+optional
-diff --git a/build/pkgs/ipykernel/checksums.ini b/build/pkgs/ipykernel/checksums.ini
-index ca1302e..724eec8 100644
---- a/build/pkgs/ipykernel/checksums.ini
-+++ b/build/pkgs/ipykernel/checksums.ini
-@@ -1,5 +1,5 @@
- tarball=ipykernel-VERSION.tar.gz
--sha1=2c2aa0e929bfd0e694da6b45d2de846a0a5d2812
--md5=78797cb2389d8f131c75280f808aac15
--cksum=1454395629
-+sha1=5a5cf7f8c0c02d0c0cc5fe3e0fe7481a86de6552
-+md5=f940975eb00de793695c386ad3a8800c
-+cksum=597841676
- upstream_url=https://pypi.io/packages/source/i/ipykernel/ipykernel-VERSION.tar.gz
-diff --git a/build/pkgs/ipykernel/dependencies b/build/pkgs/ipykernel/dependencies
-index eec7126..5b3708a 100644
---- a/build/pkgs/ipykernel/dependencies
-+++ b/build/pkgs/ipykernel/dependencies
-@@ -1,4 +1,4 @@
--$(PYTHON) ipython_genutils importlib_metadata argcomplete debugpy matplotlib_inline ipython jupyter_client tornado appnope traitlets | $(PYTHON_TOOLCHAIN)
-+$(PYTHON) ipython_genutils importlib_metadata argcomplete matplotlib_inline ipython jupyter_client tornado appnope traitlets | $(PYTHON_TOOLCHAIN)
- 
- ----------
- All lines of this file are ignored except the first.
-diff --git a/build/pkgs/ipykernel/package-version.txt b/build/pkgs/ipykernel/package-version.txt
-index a194c18..826f5ce 100644
---- a/build/pkgs/ipykernel/package-version.txt
-+++ b/build/pkgs/ipykernel/package-version.txt
-@@ -1 +1 @@
--6.5.1
-+6.6.0
-diff --git a/build/pkgs/ipykernel/patches/debugpy-make-optional.patch b/build/pkgs/ipykernel/patches/debugpy-make-optional.patch
-new file mode 100644
-index 00000000..308e4dd
---- /dev/null
-+++ b/build/pkgs/ipykernel/patches/debugpy-make-optional.patch
-@@ -0,0 +1,21 @@
-+--- a/pyproject.toml	2021-12-01 10:23:30.000000000 -0300
-++++ b/pyproject.toml	2021-12-13 18:01:36.239921204 -0300
-+@@ -3,7 +3,6 @@
-+ requires=[
-+   "setuptools",
-+   "wheel",
-+-  "debugpy",
-+   "ipython>=5",
-+   "jupyter_core>=4.2",
-+   "jupyter_client",
-+diff -ruN a/setup.py b/setup.py
-+--- a/setup.py	2021-12-01 10:23:09.000000000 -0300
-++++ b/setup.py	2021-12-13 18:01:40.112873823 -0300
-+@@ -63,7 +63,6 @@
-+     install_requires=[
-+         'importlib-metadata<5;python_version<"3.8.0"',
-+         'argcomplete>=1.12.3;python_version<"3.8.0"',
-+-        'debugpy>=1.0.0,<2.0',
-+         'ipython>=7.23.1',
-+         'traitlets>=5.1.0,<6.0',
-+         'jupyter_client<8.0',
--- 
-cgit v1.0-1-gd88e
-
diff --git a/srcpkgs/sagemath/patches/trac-33041-suppress_pythran_deprecation_warnings-ee51c4322416b2ef96590a5b42d3916342f48059.patch b/srcpkgs/sagemath/patches/trac-33041-suppress_pythran_deprecation_warnings-ee51c4322416b2ef96590a5b42d3916342f48059.patch
deleted file mode 100644
index 5263dc2d9d08..000000000000
--- a/srcpkgs/sagemath/patches/trac-33041-suppress_pythran_deprecation_warnings-ee51c4322416b2ef96590a5b42d3916342f48059.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From ee51c4322416b2ef96590a5b42d3916342f48059 Mon Sep 17 00:00:00 2001
-From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
-Date: Sat, 18 Dec 2021 14:23:57 -0800
-Subject: src/sage/all.py: Suppress numpy deprecation warnings triggered by
- pythran
-
----
- src/sage/all.py | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/src/sage/all.py b/src/sage/all.py
-index 27cbfe7..3b50ef0 100644
---- a/src/sage/all.py
-+++ b/src/sage/all.py
-@@ -91,6 +91,10 @@ warnings.filterwarnings('ignore', category=DeprecationWarning,
- warnings.filterwarnings('ignore', category=DeprecationWarning,
-     module='(.*[.]_vendor[.])?packaging')
- 
-+# Ignore numpy warnings triggered by pythran
-+warnings.filterwarnings('ignore', category=DeprecationWarning,
-+                        module='pythran')
-+
- ################ end setup warnings ###############################
- 
- 
--- 
-cgit v1.0-1-gd88e
-
diff --git a/srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-179a508cb136b860d6ef36410811f07a14658492.patch b/srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-179a508cb136b860d6ef36410811f07a14658492.patch
new file mode 100644
index 000000000000..75198ce9c3bc
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-179a508cb136b860d6ef36410811f07a14658492.patch
@@ -0,0 +1,51 @@
+From 5f492e3b7f45e65e8db8ae74d6b3aee20912a14b Mon Sep 17 00:00:00 2001
+From: Jonathan Kliem <jonathan.kliem@fu-berlin.de>
+Date: Fri, 24 Dec 2021 11:56:56 +0100
+Subject: fix alignment on 32-bit machines
+
+---
+ src/sage/data_structures/bitset_intrinsics.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/sage/data_structures/bitset_intrinsics.h b/src/sage/data_structures/bitset_intrinsics.h
+index f55b6bd..88ac659 100644
+--- a/src/sage/data_structures/bitset_intrinsics.h
++++ b/src/sage/data_structures/bitset_intrinsics.h
+@@ -29,7 +29,7 @@ const mp_bitcnt_t LIMB_SIZE = sizeof(mp_limb_t);
+ #elif __SSE4_1__
+     const mp_bitcnt_t ALIGNMENT = 16;
+ #else
+-    const mp_bitcnt_t ALIGNMENT = 8;
++    const mp_bitcnt_t ALIGNMENT = LIMB_SIZE;
+ #endif
+ 
+ // We assume that ``GMP_LIMB_BITS`` is a divisor of 64
+-- 
+cgit v1.0-1-gd88e
+
+
+From 179a508cb136b860d6ef36410811f07a14658492 Mon Sep 17 00:00:00 2001
+From: Jonathan Kliem <jonathan.kliem@fu-berlin.de>
+Date: Sun, 26 Dec 2021 19:13:16 +0100
+Subject: work around an issue with ubuntu-bionic
+
+---
+ src/sage/data_structures/bitset_intrinsics.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/sage/data_structures/bitset_intrinsics.h b/src/sage/data_structures/bitset_intrinsics.h
+index 88ac659..c21f5e2 100644
+--- a/src/sage/data_structures/bitset_intrinsics.h
++++ b/src/sage/data_structures/bitset_intrinsics.h
+@@ -29,7 +29,7 @@ const mp_bitcnt_t LIMB_SIZE = sizeof(mp_limb_t);
+ #elif __SSE4_1__
+     const mp_bitcnt_t ALIGNMENT = 16;
+ #else
+-    const mp_bitcnt_t ALIGNMENT = LIMB_SIZE;
++    const mp_bitcnt_t ALIGNMENT = sizeof(mp_limb_t);
+ #endif
+ 
+ // We assume that ``GMP_LIMB_BITS`` is a divisor of 64
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/trac-33081-fix_segfault_on_musl_1.2-36dc98f32c0b9e65a0674d13c55b00fbf7b8a1f.patch b/srcpkgs/sagemath/patches/trac-33081-fix_segfault_on_musl_1.2-36dc98f32c0b9e65a0674d13c55b00fbf7b8a1f.patch
new file mode 100644
index 000000000000..3c7c039bef66
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-33081-fix_segfault_on_musl_1.2-36dc98f32c0b9e65a0674d13c55b00fbf7b8a1f.patch
@@ -0,0 +1,68 @@
+From f36dc98f32c0b9e65a0674d13c55b00fbf7b8a1f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Sun, 26 Dec 2021 11:52:18 -0300
+Subject: trac 33081: fix integer allocation
+
+Reallocate the global dummy Integer to one limb.
+
+This is a better fix for #31340 (memory leak when the global dummy
+Integer is not allocated) and it fixes #33081 (segfault when global
+dummy Integer has more than one limb allocated, detected by malloc
+canaries in musl libc 1.2.2)
+
+Also add a function _check_global_dummy_Integer() whose only purpose is
+to doctest that the global dummy Integer satisfies all the assumptions.
+---
+ src/sage/rings/integer.pyx | 28 +++++++++++++++++++++++++---
+ 1 file changed, 25 insertions(+), 3 deletions(-)
+
+diff --git a/src/sage/rings/integer.pyx b/src/sage/rings/integer.pyx
+index fab88fd..a9ee335 100644
+--- a/src/sage/rings/integer.pyx
++++ b/src/sage/rings/integer.pyx
+@@ -7240,10 +7240,30 @@ cdef int sizeof_Integer
+ 
+ # We use a global Integer element to steal all the references
+ # from. DO NOT INITIALIZE IT AGAIN and DO NOT REFERENCE IT!
+-#
+-# Use actual calculation to avoid libgmp's new lazy allocation :trac:`31340`
+ cdef Integer global_dummy_Integer
+-global_dummy_Integer = Integer(1) - Integer(1)
++global_dummy_Integer = Integer()
++# Reallocate to one limb to fix :trac:`31340` and :trac:`33081`
++_mpz_realloc(global_dummy_Integer.value, 1)
++
++def _check_global_dummy_Integer():
++    """
++    Return true if the global dummy Integer is ok.
++
++    TEST::
++
++        sage: from sage.rings.integer import _check_global_dummy_Integer
++        sage: _check_global_dummy_Integer()
++        True
++    """
++    # Check that it has exactly one limb allocated
++    # This is assumed later in fast_tp_new() :trac:`33081`
++    cdef mpz_ptr dummy = global_dummy_Integer.value
++    if dummy._mp_alloc == 1 and dummy._mp_size == 0:
++        return True
++
++    raise AssertionError(
++      "global dummy Integer is corrupt (_mp_alloc = %d, _mp_size = %d)"
++      % (dummy._mp_alloc, dummy._mp_size))
+ 
+ 
+ # A global pool for performance when integers are rapidly created and destroyed.
+@@ -7318,6 +7338,8 @@ cdef PyObject* fast_tp_new(type t, args, kwds) except NULL:
+         #  various internals described here may change in future GMP releases.
+         #  Applications expecting to be compatible with future releases should use
+         #  only the documented interfaces described in previous chapters."
++        #
++        # NOTE: This assumes global_dummy_Integer.value._mp_alloc == 1
+         new_mpz = <mpz_ptr>((<Integer>new).value)
+         new_mpz._mp_d = <mp_ptr>check_malloc(GMP_LIMB_BITS >> 3)
+ 
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch b/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch
new file mode 100644
index 000000000000..3794aa7f019b
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-33085-pass_doctests_without_dochtml-4e364ea702799d8ddee23d306ea6622f2ac412ce.patch
@@ -0,0 +1,177 @@
+From 7d3381b21e4716cfa8a33915621a12f0eba74233 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Sun, 26 Dec 2021 18:21:18 -0300
+Subject: doctests: remove dochtml label from some tests that don't need docs
+ installed
+
+---
+ src/sage/docs/conf.py    |  4 ++--
+ src/sage/misc/sagedoc.py | 12 ++++++------
+ 2 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/src/sage/docs/conf.py b/src/sage/docs/conf.py
+index f2efb65..da41efa 100644
+--- a/src/sage/docs/conf.py
++++ b/src/sage/docs/conf.py
+@@ -719,8 +719,8 @@ def call_intersphinx(app, env, node, contnode):
+     Check that the link from the thematic tutorials to the reference
+     manual is relative, see :trac:`20118`::
+ 
+-        sage: from sage.env import SAGE_DOC  # optional - dochtml
+-        sage: thematic_index = os.path.join(SAGE_DOC, "html", "en", "thematic_tutorials", "index.html")  # optional - dochtml
++        sage: from sage.env import SAGE_DOC
++        sage: thematic_index = os.path.join(SAGE_DOC, "html", "en", "thematic_tutorials", "index.html")
+         sage: for line in open(thematic_index).readlines():  # optional - dochtml
+         ....:     if "padics" in line:
+         ....:         _ = sys.stdout.write(line)
+diff --git a/src/sage/misc/sagedoc.py b/src/sage/misc/sagedoc.py
+index eb70516..b4848ed 100644
+--- a/src/sage/misc/sagedoc.py
++++ b/src/sage/misc/sagedoc.py
+@@ -18,8 +18,8 @@ TESTS:
+ Check that argspecs of extension function/methods appear correctly,
+ see :trac:`12849`::
+ 
+-    sage: from sage.env import SAGE_DOC  # optional - dochtml
+-    sage: docfilename = os.path.join(SAGE_DOC, 'html', 'en', 'reference', 'calculus', 'sage', 'symbolic', 'expression.html')  # optional - dochtml
++    sage: from sage.env import SAGE_DOC
++    sage: docfilename = os.path.join(SAGE_DOC, 'html', 'en', 'reference', 'calculus', 'sage', 'symbolic', 'expression.html')
+     sage: with open(docfilename) as fobj:  # optional - dochtml
+     ....:     for line in fobj:
+     ....:         if "#sage.symbolic.expression.Expression.numerical_approx" in line:
+@@ -839,12 +839,12 @@ def _search_src_or_doc(what, string, extra1='', extra2='', extra3='',
+ 
+     ::
+ 
+-        sage: from sage.misc.sagedoc import _search_src_or_doc  # optional - dochtml
+-        sage: len(_search_src_or_doc('src', r'matrix\(', 'incidence_structures', 'self', 'combinat', interact=False).splitlines()) > 1  # optional - dochtml
++        sage: from sage.misc.sagedoc import _search_src_or_doc
++        sage: len(_search_src_or_doc('src', r'matrix\(', 'incidence_structures', 'self', 'combinat', interact=False).splitlines()) > 1
+         True
+         sage: 'abvar/homology' in _search_src_or_doc('doc', 'homology', 'variety', interact=False)  # optional - dochtml, long time (4s on sage.math, 2012)
+         True
+-        sage: 'divisors' in _search_src_or_doc('src', '^ *def prime', interact=False)  # optional - dochtml
++        sage: 'divisors' in _search_src_or_doc('src', '^ *def prime', interact=False)
+         True
+ 
+     When passing ``interactive=True``, in a terminal session this will pass the
+@@ -1363,7 +1363,7 @@ class _sage_doc:
+ 
+         sage: browse_sage_doc._open("reference", testing=True)[0]  # optional - dochtml, indirect doctest
+         'http://localhost:8000/doc/live/reference/index.html'
+-        sage: browse_sage_doc(identity_matrix, 'rst')[-107:-47]  # optional - dochtml
++        sage: browse_sage_doc(identity_matrix, 'rst')[-107:-47]
+         'Full MatrixSpace of 3 by 3 sparse matrices over Integer Ring'
+     """
+     def __init__(self):
+-- 
+cgit v1.0-1-gd88e
+
+
+From 42a76c3f82edecc9c6c53c661251677e3e907584 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Sun, 26 Dec 2021 18:22:13 -0300
+Subject: doctests: add dochtml label to some tests that need docs installed
+
+---
+ src/sage_docbuild/__init__.py | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/src/sage_docbuild/__init__.py b/src/sage_docbuild/__init__.py
+index 4a71c91..dd233bd 100644
+--- a/src/sage_docbuild/__init__.py
++++ b/src/sage_docbuild/__init__.py
+@@ -105,7 +105,7 @@ def builder_helper(type):
+         sage: from sage_docbuild import builder_helper, build_ref_doc
+         sage: from sage_docbuild import _build_many as build_many
+         sage: helper = builder_helper("html")
+-        sage: try:
++        sage: try:  # optional - dochtml
+         ....:     build_many(build_ref_doc, [("docname", "en", "html", {})])
+         ....: except Exception as E:
+         ....:     "Non-exception during docbuild: abort pool operation" in str(E)
+@@ -186,7 +186,7 @@ class DocBuilder(object):
+ 
+             sage: from sage_docbuild import DocBuilder
+             sage: b = DocBuilder('tutorial')
+-            sage: b._output_dir('html')
++            sage: b._output_dir('html')         # optional - dochtml
+             '.../html/en/tutorial'
+         """
+         d = os.path.join(SAGE_DOC, type, self.lang, self.name)
+@@ -203,7 +203,7 @@ class DocBuilder(object):
+ 
+             sage: from sage_docbuild import DocBuilder
+             sage: b = DocBuilder('tutorial')
+-            sage: b._doctrees_dir()
++            sage: b._doctrees_dir()             # optional - docthml
+             '.../doctrees/en/tutorial'
+         """
+         d = os.path.join(SAGE_DOC, 'doctrees', self.lang, self.name)
+@@ -529,7 +529,7 @@ class ReferenceBuilder(AllBuilder):
+ 
+             sage: from sage_docbuild import ReferenceBuilder
+             sage: b = ReferenceBuilder('reference')
+-            sage: b._output_dir('html')
++            sage: b._output_dir('html')         # optional - dochtml
+             '.../html/en/reference'
+         """
+         if lang is None:
+@@ -640,7 +640,7 @@ class ReferenceTopBuilder(DocBuilder):
+ 
+             sage: from sage_docbuild import ReferenceTopBuilder
+             sage: b = ReferenceTopBuilder('reference')
+-            sage: b._output_dir('html')
++            sage: b._output_dir('html')         # optional - dochtml
+             '.../html/en/reference'
+         """
+         if lang is None:
+-- 
+cgit v1.0-1-gd88e
+
+
+From 4e364ea702799d8ddee23d306ea6622f2ac412ce Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Sun, 26 Dec 2021 18:22:49 -0300
+Subject: doctests: use dochtml as default option only when html docs are
+ installed
+
+---
+ src/bin/sage-runtests | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/src/bin/sage-runtests b/src/bin/sage-runtests
+index 589dc8c..6e6fa5b 100755
+--- a/src/bin/sage-runtests
++++ b/src/bin/sage-runtests
+@@ -8,6 +8,7 @@ import sys
+ DOT_SAGE = os.environ.get('DOT_SAGE', os.path.join(os.environ.get('HOME'),
+                                                    '.sage'))
+ SAGE_ROOT = os.environ.get('SAGE_ROOT')
++SAGE_DOC = os.environ.get('SAGE_DOC')
+ 
+ # Override to not pick up user configuration, see Trac #20270
+ os.environ['SAGE_STARTUP_FILE'] = os.path.join(DOT_SAGE, 'init-doctests.sage')
+@@ -15,7 +16,7 @@ os.environ['SAGE_STARTUP_FILE'] = os.path.join(DOT_SAGE, 'init-doctests.sage')
+ 
+ def _get_optional_defaults():
+     """Return the default value for the --optional flag."""
+-    optional = ['sage', 'dochtml', 'optional']
++    optional = ['sage', 'optional']
+ 
+     # This should be good-enough to determine if we are in a sage source
+     # repository working tree
+@@ -24,6 +25,10 @@ def _get_optional_defaults():
+             os.path.isfile(os.path.join(SAGE_ROOT, 'sage'))):
+         optional.append('build')
+ 
++    # Check if the html docs are installed
++    if (SAGE_DOC and os.path.isdir(os.path.join(SAGE_DOC, 'html'))):
++        optional.append('dochtml')
++
+     return ','.join(optional)
+ 
+ 
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index c2ba123ca0ac..ba6333483d76 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -1,6 +1,6 @@
 # Template file for 'sagemath'
 pkgname=sagemath
-version=9.5.beta8
+version=9.5.beta9
 revision=1
 wrksrc=sage-$version
 build_style=configure
@@ -19,7 +19,7 @@ maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
 license="GPL-3.0-or-later"
 homepage="http://sagemath.org/"
 distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
-checksum=124f3d23ce6442ecc84ed98e3c035e0d00c8261c3125712e4742c32e731d13de
+checksum=32ca429c0bdbb90c9999bca4ba858d1def280425d42048c4230dae005de2a0d1
 python_version=3
 
 build_options="debug system_python3"
@@ -36,25 +36,10 @@ case ${version} in
 	*.beta*|*.rc*) distfiles=${distfiles/sage\/src/sage\/devel} ;;
 esac
 
-# extra upstream packages (trac-30766 / trac-32968 / trac-33020 / trac-33040)
+# extra upstream packages (trac-32968 / trac-33040)
 _upstream="
- https://pypi.io/packages/source/i/ipython/ipython-7.29.0.tar.gz
- https://pypi.io/packages/source/i/ipykernel/ipykernel-6.5.1.tar.gz
- https://pypi.io/packages/source/i/ipywidgets/ipywidgets-7.6.5.tar.gz
- https://pypi.io/packages/source/j/jedi/jedi-0.18.1.tar.gz
- https://pypi.io/packages/source/p/prompt_toolkit/prompt_toolkit-3.0.22.tar.gz
- https://pypi.io/packages/source/w/widgetsnbextension/widgetsnbextension-3.5.2.tar.gz
- https://pypi.io/packages/source/t/terminado/terminado-0.12.1.tar.gz
- https://pypi.io/packages/source/n/notebook/notebook-6.4.6.tar.gz
- https://pypi.io/packages/source/n/nbclient/nbclient-0.5.9.tar.gz
- https://pypi.io/packages/source/j/jupyter_client/jupyter_client-7.1.0.tar.gz
- https://pypi.io/packages/source/j/jupyter_core/jupyter_core-4.9.1.tar.gz
- https://pypi.io/packages/source/i/importlib_metadata/importlib_metadata-4.8.2.tar.gz
-
  https://pypi.io/packages/source/s/sphinx/Sphinx-4.3.1.tar.gz
 
- https://pypi.io/packages/source/i/ipykernel/ipykernel-6.6.0.tar.gz
-
  https://files.pythonhosted.org/packages/source/c/cycler/cycler-0.11.0.tar.gz
  https://files.pythonhosted.org/packages/source/k/kiwisolver/kiwisolver-1.3.2.tar.gz
  https://pypi.io/packages/source/p/pytz/pytz-2021.3.tar.gz
@@ -69,23 +54,8 @@ _upstream="
 "
 
 checksum+="
- 4f69d7423a5a1972f6347ff233e38bbf4df6a150ef20fbb00c635442ac3060aa
- dd27172bccbbcfef952991e49372e4c6fd1c14eed0df05ebd5b4335cb27a81a2
- 00974f7cb4d5f8d494c19810fedb9fa9b64bffd3cda7c2be23c133a1ad3c99c5
- 74137626a64a99c8eb6ae5832d99b3bdd7d29a3850fe2aa80a4126b2a7d949ab
- 449f333dd120bd01f5d296a8ce1452114ba3a71fae7288d2f0ae2c918764fa72
- e0731a60ba540cd19bbbefe771a9076dcd2dde90713a8f87f27f53f2d1db7727
- b20fd93cc57c1678c799799d117874367cc07a3d2d55be95205b1a88fa08393f
- 7bcdf79bd1cda534735bd9830d2cbedab4ee34d8fe1df6e7b946b3aab0902ba3
- 99e46ddafacd0b861293bf246fed8540a184adfa3aa7d641f89031ec070701e0
- a5f995a73cffb314ed262713ae6dfce53c6b8216cea9f332071b8ff44a6e1654
- dce8a7499da5a53ae3afd5a9f4b02e5df1d57250cf48f3ad79da23b4778cd6fa
- 75bdec14c397f528724c1bfd9709d660b33a4d2e77387a3358f20b848bb5e5fb
-
  32a5b3e9a1b176cc25ed048557d4d3d01af635e6b76c5bc7a43b0a34447fbd45
 
- 3a227788216b43982d9ac28195949467627b0d16e6b8af9741d95dcaa8c41a89
-
  9c87405839a19696e837b3b818fed3f5f69f16f1eec1a1ad77e043dcea9c772f
  fc4453705b81d03568d5b808ad8f09c77c47534f6ac2e72e733f9ca4714aa75c
  acad2d8b20a1af07d4e4c9d2e9285c5ed9104354062f275f3fcd88dcef4f1326
@@ -168,13 +138,6 @@ do_install() {
 	do
 		rm -rf ${DESTDIR}/$_SAGE_ROOT/$d
 	done
-	# keep required empty dirs
-	for d in local/share/doc/sage/html/en/{docname,tutorial,reference} \
-	         local/share/doc/sage/doctrees/en/{docname,tutorial}
-	do
-		mkdir -p ${DESTDIR}/$_SAGE_ROOT/$d
-		touch ${DESTDIR}/$_SAGE_ROOT/$d/.empty
-	done
 
 	# symlink main binary
 	vmkdir usr/bin

From 47dbc94f5bfc26f81b834450309139c491de8d47 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sun, 26 Dec 2021 20:20:38 -0300
Subject: [PATCH 19/19] sagemath: change do_install()

The new way installs by whitelist, only what is necessary (it's possible
that something else can be removed in src, but not a lot since src/sage
is required for the internal help)

Also add two more patches: the last remaining issue on i686 and a patch
that avoids the need to install the build directory.

Hopefully now all tests pass on x86_64, x86_64-musl, and i686.  Both
when running in the build chroot by xbps-src check, and also when
running after installation by sage --testall.
---
 ...e-site-exec-only-if-it-is-executable.patch | 43 +++++++++++++++++++
 ...3138d0403be7c7cb303de2bc0a0e0b6793c.patch} | 31 +++++++++++++
 srcpkgs/sagemath/template                     | 24 +++++++----
 3 files changed, 90 insertions(+), 8 deletions(-)
 create mode 100644 srcpkgs/sagemath/patches/0001-sage-site-exec-only-if-it-is-executable.patch
 rename srcpkgs/sagemath/patches/{trac-33073-fix_segfault_on_polyhedra-179a508cb136b860d6ef36410811f07a14658492.patch => trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch} (56%)

diff --git a/srcpkgs/sagemath/patches/0001-sage-site-exec-only-if-it-is-executable.patch b/srcpkgs/sagemath/patches/0001-sage-site-exec-only-if-it-is-executable.patch
new file mode 100644
index 000000000000..ce17c6d6e954
--- /dev/null
+++ b/srcpkgs/sagemath/patches/0001-sage-site-exec-only-if-it-is-executable.patch
@@ -0,0 +1,43 @@
+From 424de0923cb3d44d010e3e2f9bd7bc75d5c30234 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Sun, 26 Dec 2021 22:34:39 -0300
+Subject: [PATCH] sage-site: exec only if it is executable
+
+---
+ src/bin/sage | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/bin/sage b/src/bin/sage
+index 4c0fa17426..153e610a2e 100755
+--- a/src/bin/sage
++++ b/src/bin/sage
+@@ -129,7 +129,7 @@ usage() {
+     echo "                           --optional - controls which optional tests are run"
+     echo "                           --help - show all testing options"
+     echo "  -v, --version       -- display Sage version information"
+-    if [ -n "$SAGE_ROOT" ]; then
++    if [ -n "$SAGE_ROOT" -a -x "$SAGE_ROOT/build/bin/sage-site" ]; then
+         exec "$SAGE_ROOT/build/bin/sage-site" "-h"
+     fi
+     exit 0
+@@ -555,7 +555,7 @@ usage_advanced() {
+     echo "                         files are named sage-omega.PID can be found in"
+     echo "                         \$DOT_SAGE"
+     echo "  --valgrind          -- this is an alias for --memcheck"
+-    if [ -n "$SAGE_ROOT" ]; then
++    if [ -n "$SAGE_ROOT" -a -x "$SAGE_ROOT/build/bin/sage-site" ]; then
+         exec "$SAGE_ROOT/build/bin/sage-site" "--advanced"
+     fi
+     echo
+@@ -1131,7 +1131,7 @@ case "$1" in
+     -*)
+         # Delegate further option handling to the non-installed sage-site script.
+         # (These options become unavailable if the directory $SAGE_ROOT is removed.)
+-        if [ -n "$SAGE_ROOT" ]; then
++        if [ -n "$SAGE_ROOT" -a -x "$SAGE_ROOT/build/bin/sage-site" ]; then
+             exec "$SAGE_ROOT/build/bin/sage-site" "$@"
+             # fallthrough if there is no sage-site script
+         fi
+-- 
+2.34.1
+
diff --git a/srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-179a508cb136b860d6ef36410811f07a14658492.patch b/srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch
similarity index 56%
rename from srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-179a508cb136b860d6ef36410811f07a14658492.patch
rename to srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch
index 75198ce9c3bc..6bc5193b75ee 100644
--- a/srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-179a508cb136b860d6ef36410811f07a14658492.patch
+++ b/srcpkgs/sagemath/patches/trac-33073-fix_segfault_on_polyhedra-177903138d0403be7c7cb303de2bc0a0e0b6793c.patch
@@ -49,3 +49,34 @@ index 88ac659..c21f5e2 100644
 -- 
 cgit v1.0-1-gd88e
 
+
+From 177903138d0403be7c7cb303de2bc0a0e0b6793c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Sun, 26 Dec 2021 23:26:12 -0300
+Subject: fix a test on 32-bit machines
+
+---
+ .../geometry/polyhedron/combinatorial_polyhedron/list_of_faces.pyx   | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/sage/geometry/polyhedron/combinatorial_polyhedron/list_of_faces.pyx b/src/sage/geometry/polyhedron/combinatorial_polyhedron/list_of_faces.pyx
+index 69a659c..0478b6c 100644
+--- a/src/sage/geometry/polyhedron/combinatorial_polyhedron/list_of_faces.pyx
++++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/list_of_faces.pyx
+@@ -156,10 +156,11 @@ cdef class ListOfFaces:
+             sage: from memory_allocator.test import TestMemoryAllocator
+             sage: t = TestMemoryAllocator()
+             sage: m = t.size_t_max()
++            # The following is only certain to fail on 64-bit
+             sage: ListOfFaces(1, m, 1)
+-            Traceback (most recent call last):
++            Traceback (most recent call last):          # 64-bit
+             ...
+-            MemoryError: failed to allocate ...
++            MemoryError: failed to allocate ...         # 64-bit
+         """
+         face_list_free(self.data)
+ 
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
index ba6333483d76..c5009269c7fc 100644
--- a/srcpkgs/sagemath/template
+++ b/srcpkgs/sagemath/template
@@ -129,15 +129,23 @@ pre_configure() {
 # }
 
 do_install() {
-	vcopy $_SAGE_ROOT usr/lib/
-	# cleanup: upstream packages and build artifacts
-	rm -rf ${DESTDIR}/$_SAGE_ROOT/upstream
-	#rm -rf ${DESTDIR}/$_SAGE_ROOT/pkgs/*/build
-	# more cleanup
-	for d in .ci .circleci .git .github autom4te.cache config docker m4
-	do
-		rm -rf ${DESTDIR}/$_SAGE_ROOT/$d
+	vlicense COPYING.txt
+	vdoc README.md
+	vmkdir $_SAGE_ROOT
+	vcopy "VERSION.txt prefix sage venv" $_SAGE_ROOT
+	vmkdir $_SAGE_ROOT/local
+	for f in bin include lib share; do
+		vcopy local/$f $_SAGE_ROOT/local
 	done
+	vmkdir $_SAGE_ROOT/$(readlink venv)
+	for f in pyvenv.cfg bin etc lib share; do
+		vcopy venv/$f $_SAGE_ROOT/venv/
+	done
+	vcopy "src" $_SAGE_ROOT # only src/sage ?
+
+	# not needed ?
+	# Maybe pkgs/sagemath-standard/build/cythonized for debug
+	#vcopy "build pkgs" $_SAGE_ROOT
 
 	# symlink main binary
 	vmkdir usr/bin

  parent reply	other threads:[~2021-12-27  4:12 UTC|newest]

Thread overview: 250+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
2021-11-11 16:08 ` dkwo
2021-11-12  7:27 ` fosslinux
2021-11-12 20:16 ` dkwo
2021-11-12 20:22 ` dkwo
2021-11-12 20:28 ` dkwo
2021-11-12 20:37 ` dkwo
2021-11-12 22:06 ` fosslinux
2021-11-12 22:12 ` [PR REVIEW] " Duncaen
2021-11-13  1:27 ` tornaria
2021-11-13  1:30 ` tornaria
2021-11-13  1:33 ` tornaria
2021-11-13  3:14 ` [PR PATCH] [Updated] " tornaria
2021-11-13  3:18 ` tornaria
2021-11-13  8:59 ` dkwo
2021-11-13  9:02 ` dkwo
2021-11-13  9:28 ` dkwo
2021-11-13  9:36 ` dkwo
2021-11-13 10:22 ` dkwo
2021-11-13 10:48 ` dkwo
2021-11-13 10:50 ` [PR PATCH] [Updated] " tornaria
2021-11-13 10:59 ` tornaria
2021-11-13 11:05 ` tornaria
2021-11-13 11:42 ` tornaria
2021-11-13 12:30 ` dkwo
2021-11-13 13:48 ` dkwo
2021-11-13 13:50 ` dkwo
2021-11-13 13:53 ` leahneukirchen
2021-11-13 14:20 ` leahneukirchen
2021-11-13 14:22 ` leahneukirchen
2021-11-13 14:55 ` leahneukirchen
2021-11-13 14:58 ` leahneukirchen
2021-11-13 15:00 ` dkwo
2021-11-13 15:07 ` leahneukirchen
2021-11-13 15:11 ` leahneukirchen
2021-11-13 15:28 ` dkwo
2021-11-13 15:34 ` leahneukirchen
2021-11-14  4:42 ` ericonr
2021-11-14  4:43 ` ericonr
2021-11-14 14:27 ` leahneukirchen
2021-11-14 15:20 ` tornaria
2021-11-14 16:31 ` leahneukirchen
2021-11-14 21:28 ` [PR PATCH] [Updated] " tornaria
2021-11-14 21:47 ` tornaria
2021-11-15 15:58 ` leahneukirchen
2021-11-15 16:16 ` tornaria
2021-11-17  9:20 ` dkwo
2021-11-20 22:12 ` [PR PATCH] [Updated] " tornaria
2021-11-21  9:37 ` dkwo
2021-11-21 14:00 ` tornaria
2021-11-21 19:44 ` dkwo
2021-11-22 12:51 ` tornaria
2021-11-22 13:17 ` [WIP] New package: sagemath-9.5.beta7 dkwo
2021-11-22 14:30 ` [PR PATCH] [Updated] " tornaria
2021-11-22 14:35 ` tornaria
2021-11-22 14:55 ` tornaria
2021-11-22 15:22 ` tornaria
2021-11-22 15:30 ` dkwo
2021-11-22 15:30 ` dkwo
2021-11-22 15:41 ` dkwo
2021-11-22 16:30 ` dkwo
2021-11-22 16:35 ` tornaria
2021-11-22 17:09 ` dkwo
2021-11-22 17:28 ` tornaria
2021-11-22 17:52 ` dkwo
2021-11-22 23:41 ` tornaria
2021-11-23  3:22 ` [PR PATCH] [Updated] " tornaria
2021-11-23  3:25 ` tornaria
2021-11-23  9:22 ` dkwo
2021-11-23 12:16 ` tornaria
2021-11-24 19:28 ` tornaria
2021-11-25 22:41 ` tornaria
2021-11-26  3:04 ` [PR PATCH] [Updated] " tornaria
2021-11-26  3:12 ` tornaria
2021-11-26  9:30 ` dkwo
2021-11-26  9:31 ` dkwo
2021-11-26  9:33 ` dkwo
2021-11-26 13:10 ` tornaria
2021-11-27 14:08 ` dkwo
2021-11-28 12:32 ` tornaria
2021-11-28 13:42 ` tornaria
2021-11-28 13:52 ` tornaria
2021-11-28 23:21 ` [PR PATCH] [Updated] " tornaria
2021-11-28 23:27 ` tornaria
2021-11-28 23:32 ` tornaria
2021-12-02 16:38 ` dkwo
2021-12-02 16:44 ` leahneukirchen
2021-12-02 17:04 ` dkwo
2021-12-02 17:12 ` leahneukirchen
2021-12-04 15:37 ` [PR PATCH] [Updated] " tornaria
2021-12-04 15:38 ` tornaria
2021-12-04 15:47 ` tornaria
2021-12-05 10:22 ` dkwo
2021-12-10 21:28 ` dkwo
2021-12-10 21:31 ` dkwo
2021-12-11  2:29 ` ericonr
2021-12-11 17:58 ` dkwo
2021-12-13  3:13 ` [PR PATCH] [Updated] " tornaria
2021-12-13  9:25 ` dkwo
2021-12-13 13:17 ` tornaria
2021-12-13 13:28 ` dkwo
2021-12-13 15:25 ` dkwo
2021-12-13 17:10 ` tornaria
2021-12-13 17:48 ` tornaria
2021-12-13 20:34 ` dkwo
2021-12-13 21:00 ` dkwo
2021-12-13 21:13 ` dkwo
2021-12-14 17:36 ` ericonr
2021-12-15 10:41 ` dkwo
2021-12-15 14:57 ` tornaria
2021-12-15 14:59 ` tornaria
2021-12-15 15:04 ` dkwo
2021-12-15 15:19 ` dkwo
2021-12-16 23:11 ` tornaria
2021-12-17 20:08 ` dkwo
2021-12-20  2:23 ` tornaria
2021-12-20  2:35 ` [PR PATCH] [Updated] " tornaria
2021-12-23 17:18 ` [WIP] New package: sagemath-9.5.beta8 dkwo
2021-12-23 17:47 ` dkwo
2021-12-23 18:28 ` tornaria
2021-12-23 19:20 ` dkwo
2021-12-23 19:39 ` tornaria
2021-12-23 19:50 ` tornaria
2021-12-23 20:41 ` dkwo
2021-12-23 22:08 ` tornaria
2021-12-24  9:08 ` dkwo
2021-12-24 11:36 ` tornaria
2021-12-24 11:53 ` dkwo
2021-12-24 12:15 ` tornaria
2021-12-24 16:10 ` tornaria
2021-12-24 16:35 ` tornaria
2021-12-24 17:39 ` tornaria
2021-12-25  8:44 ` dkwo
2021-12-25 13:33 ` tornaria
2021-12-25 15:29 ` tornaria
2021-12-25 15:59 ` ericonr
2021-12-25 15:59 ` ericonr
2021-12-25 16:21 ` tornaria
2021-12-26  2:11 ` ericonr
2021-12-26  9:28 ` dkwo
2021-12-26 10:33 ` dkwo
2021-12-26 10:34 ` dkwo
2021-12-26 10:36 ` dkwo
2021-12-27  0:08 ` [PR PATCH] [Updated] " tornaria
2021-12-27  4:12 ` tornaria [this message]
2021-12-27 16:28 ` dkwo
2021-12-27 16:29 ` dkwo
2021-12-27 16:37 ` tornaria
2021-12-27 17:15 ` tornaria
2021-12-27 21:52 ` ericonr
2021-12-27 23:21 ` [PR PATCH] [Updated] " tornaria
2021-12-28 15:50 ` [WIP] New package: sagemath-9.5.beta9 dkwo
2021-12-28 17:37 ` tornaria
2021-12-28 18:31 ` dkwo
2021-12-28 18:55 ` dkwo
2021-12-28 21:23 ` tornaria
2021-12-28 22:08 ` tornaria
2021-12-28 22:12 ` tornaria
2021-12-28 22:15 ` tornaria
2021-12-28 23:22 ` tornaria
2021-12-29 12:37 ` dkwo
2022-01-03 20:02 ` [PR PATCH] [Updated] " tornaria
2022-01-03 20:50 ` tornaria
2022-01-04 17:52 ` dkwo
2022-01-04 17:57 ` dkwo
2022-01-04 18:14 ` tornaria
2022-01-04 18:14 ` [PR PATCH] [Closed]: " tornaria
2022-01-04 18:17 ` tornaria
2022-01-04 18:17 ` tornaria
2022-01-04 18:28 ` tornaria
2022-01-04 18:48 ` tornaria
2022-01-05  9:56 ` dkwo
2022-01-07 10:55 ` dkwo
2022-01-07 10:57 ` dkwo
2022-01-07 10:59 ` dkwo
2022-01-07 15:04 ` tornaria
2022-01-07 15:13 ` tornaria
2022-01-08 16:51 ` [PR PATCH] [Updated] " tornaria
2022-01-10  3:22 ` tornaria
2022-01-11 13:00 ` [WIP] New package: sagemath-9.5.rc0 dkwo
2022-01-11 13:39 ` tornaria
2022-01-11 14:39 ` tornaria
2022-01-12 23:43 ` [PR PATCH] [Updated] " tornaria
2022-01-12 23:47 ` tornaria
2022-01-13  2:34 ` tornaria
2022-01-13 18:50 ` [PR PATCH] [Updated] " tornaria
2022-01-13 19:11 ` tornaria
2022-01-14 14:34 ` [PR PATCH] [Updated] " tornaria
2022-01-14 14:36 ` tornaria
2022-01-14 14:48 ` tornaria
2022-01-14 15:21 ` [PR PATCH] [Updated] [WIP] New package: sagemath-9.5.rc1 tornaria
2022-01-14 15:24 ` tornaria
2022-01-14 15:27 ` leahneukirchen
2022-01-14 15:31 ` tornaria
2022-01-14 16:35 ` leahneukirchen
2022-01-14 16:57 ` tornaria
2022-01-14 17:04 ` leahneukirchen
2022-01-14 17:39 ` leahneukirchen
2022-01-15  2:13 ` [PR PATCH] [Updated] " tornaria
2022-01-15  4:48 ` tornaria
2022-01-15 13:35 ` tornaria
2022-01-15 13:57 ` tornaria
2022-01-15 17:55 ` dkwo
2022-01-15 18:23 ` tornaria
2022-01-15 18:24 ` tornaria
2022-01-15 18:27 ` [PR PATCH] [Updated] " tornaria
2022-01-15 18:31 ` tornaria
2022-01-17  5:10 ` [PR PATCH] [Updated] " tornaria
2022-01-17  5:17 ` [WIP] New package: sagemath-9.5.rc2 tornaria
2022-01-17  5:31 ` tornaria
2022-01-17  5:54 ` [PR PATCH] [Updated] " tornaria
2022-01-17  5:55 ` tornaria
2022-01-17  9:37 ` dkwo
2022-01-17 10:42 ` tornaria
2022-01-17 10:50 ` dkwo
2022-01-17 13:07 ` [PR PATCH] [Updated] " tornaria
2022-01-17 16:20 ` dkwo
2022-01-17 17:05 ` dkwo
2022-01-17 17:17 ` tornaria
2022-01-17 17:24 ` dkwo
2022-01-18  1:46 ` [PR PATCH] [Updated] " tornaria
2022-01-18  1:47 ` tornaria
2022-01-18  9:05 ` dkwo
2022-01-18  9:56 ` [PR PATCH] [Updated] " tornaria
2022-01-18 21:55 ` tornaria
2022-01-19 11:01 ` tornaria
2022-01-19 11:09 ` tornaria
2022-01-19 13:37 ` tornaria
2022-01-19 16:51 ` [PR PATCH] [Updated] " tornaria
2022-01-19 17:08 ` tornaria
2022-01-19 17:22 ` dkwo
2022-01-20 13:17 ` [WIP] New package: sagemath-9.5.rc3 dkwo
2022-01-20 15:41 ` tornaria
2022-01-20 15:53 ` dkwo
2022-01-20 16:04 ` dkwo
2022-01-20 16:04 ` dkwo
2022-01-25 20:37 ` [PR PATCH] [Updated] " tornaria
2022-01-25 21:27 ` [WIP] New package: sagemath-9.5.rc4 leahneukirchen
2022-01-25 23:19 ` tornaria
2022-01-26 13:07 ` [PR PATCH] [Updated] " tornaria
2022-01-30 22:13 ` tornaria
2022-01-30 22:41 ` [WIP] New package: sagemath-9.5 tornaria
2022-01-31  9:01 ` dkwo
2022-01-31  9:40 ` dkwo
2022-02-02 21:03 ` [PR PATCH] [Updated] " tornaria
2022-02-02 21:41 ` tornaria
2022-02-03  0:31 ` tornaria
2022-02-03  2:48 ` tornaria
2022-02-03 13:31 ` [PR PATCH] [Merged]: " leahneukirchen
2022-02-03 15:41 ` Vindaar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211227041243.YIYnBzJKFHMa05iOlyrDP45wEdE15QJLQuL75gSEgKs@z \
    --to=tornaria@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    --subject='Re: [PR PATCH] [Updated] [WIP] New package: sagemath-9.5.beta8' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).